[lug] library naming conventions, sym links

D. Stimits stimits at comcast.net
Sun Jul 17 08:59:05 MDT 2005


Chan Kar Heng wrote:
> hi all,
> 
> the only implication i can suggest is that an rpm packager has the 
> responsibility to recreate all sym links with every update & can't be 
> lazy with the way rpm prefers it (the latter way).
> 
> eg:
> 
> Existing:
> libSomeLib.so.0.0.0
> libSomeLib.so.0.0 -> libSomeLib.so.0.0.0
> libSomeLib.so.0 -> libSomeLib.0.0
> libSomeLib.so -> libSomeLib.0
> 
> Introduction of a patch/minor upgrade:
> libSomeLib.so.0.0.1
> 
> Update required:
> rm libSomeLib.so.0.0
> ln -s libSomeLib.so.0.0.1 libSomeLib.so.0.0
> 
> All libSomeLib.so.0.0, libSomeLib.so.0 & libSomeLib.so still refer to 
> the new/latest libSomeLib.
> 
> if on the otherhand:
> 
> Existing:
> libSomeLib.so.0.0.0
> libSomeLib.so.0.0 -> libSomeLib.so.0.0.0
> libSomeLib.so.0 -> libSomeLib.so.0.0.0
> libSomeLib.so -> libSomeLib.so.0.0.0
> 
> Introduction of a patch/minor upgrade:
> libSomeLib.so.0.0.1
> 
> Update required:
> rm libSomeLib.so.0.0 libSomeLib.so.0 libSomeLib.so
> ln -s libSomeLib.so.0.0.1 libSomeLib.so.0.0
> # these are also required, else libSomeLib.so.0 & libSomeLib.so breaks.
> ln -s libSomeLib.so.0.0.1 libSomeLib.so.0
> ln -s libSomeLib.so.0.0.1 libSomeLib.so
> 
> i'd assume rpm assumes packagers aren't lazy & always recreates all 
> symlinks..?
...

This is what I'm talking about. If the sym links are chained, then it is 
not possible for a new install to fail to update all of the links, 
because only 1 link matters. When all links point at the hard file, all 
of them must be updated...failure to do so can break things. It isn't 
possible to update the sym links wrong if you only need to update the 
one link in a chain; updating all links requires trusting the packager 
to know what all of the links are, and to deal with them properly. Those 
version numbers lose all meaning when you just point them all at the 
hard file. Some people will disagree, but add in compatibility libs and 
software that depends on old versions, and things change.

D. Stimits, stimits AT comcast DOT net



More information about the LUG mailing list