Library versioning vs RPM versioning

Ralf Corsepius rc040203 at freenet.de
Wed Oct 19 07:33:31 UTC 2005


On Wed, 2005-10-19 at 08:34 +0200, Linus Walleij wrote:
> Need to get this clear, out of curiosity...
> 
> If say, foo-1.0-1.rpm provides a library as /usr/lib/libfoo.so.1 and then 
> we say foo-1.1-1.rpm is released providing /usr/lib/libfoo.so.2.
> 
> Then, if there is one package bar-1.0.rpm that needs 
> /usr/lib/libfoo.so.1 (and has Requires: foo = 1.0 in its spec) and 
> another baz-1.2.rpm that needs /usr/lib/libfoo.so.2 (and has Requires foo 
> = 1.1 in its spec), what happens from a user point of view?
Things break.

> As I understand it, as long as no files collide you could have both 
> foo-1.0-1 and foo-1.1-1 installed and satisfy both dependencies.
No. Normally, only one version of a package can be installed at a time.

>  So using command-line rpm that's all pretty easy.
Not true. You won't be able to install foo-1.0-1 and foo-1.1-1 in
parallel unless you use brute force (rpm --force).

>  But will yum do the same? 
> What yum should then do when you issue "yum install baz" with "bar" 
> already installled is install the new one and keep the old one as well, 
> since it is still being used.
> 
> Am I correct? I haven't been able to find any reasoning for these 
> scenarios in the docs that I've read yet... If you know library versioning 
> vs RPM philosophy then spill the beans, please.
Shared library file names (That's what you actually seem to be referring
to) and package versions are not connected by any means.

Worse, if you look into details, besides these, there exist other
"versions" which also interfere here:
* Shared libraries' SONAMEs (cf. ldconfig)
* rpm's arch'ed SONAMEs.

> (And this is a strong argument for keeping old versions of packages in the 
> repository,
It isn't. Your scenario doesn't work.

>  then, atleast stuff providing libraries, since someone who 
> want to install both "bar" and "baz" will need two versions.)
If you want bar and baz be installable in parallel, you will have to
make these packages and their dependencies installable in parallel.

Ralf





More information about the fedora-extras-list mailing list