how does rpm install choose among multiple versions of same package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a question about what "rpm install" does when you list multiple
packages of the same name on the command line.  Here is the behavior I see
using rpm-4.2.1-0.30.

Assume I have two package files:

  my_package-1-1.arch.rpm   (version 1, release 1)
  my_package-2-1.arch.rpm   (version 2, release 1)

and assume that file(s) in the package are different between the two
versions (so that the two packages cannot be simultaneously installed 
because of these conflicts).

Rpm has different behavior depending on the order that these packages are 
listed as arguments.  Assume that no versions of my_package are installed 
prior to issuing either of the following commands:

> rpm -i my_package-1-1.arch.rpm my_package-2-1.arch.rpm
warning: package my_package = 1-1 was already added, 
         replacing with my_package <= 2-1

(Result: only my_package-2-1 is installed)

> rpm -i my_package-2-1.arch.rpm my_package-1-1.arch.rpm
file <filename> conflicts between attempted installs of 
my_package-2-1 and my_package-1-1

(Result: neither package is installed)

I suspect that when multiple versions (or releases) of the same package
name are given as arguments to rpm install, and when these packages 
contain conflicting files, rpm install will:

  - install nothing 
        IF the packages are not listed in order of increasing version/release

  - install only the package with the greatest version/release
        IF the packages are listed in order of increasing version/release
               
Can someone confirm/refute this?  I'm asking because I often like to
download the entire directory of package updates, e.g. from
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/i386/ ,
onto my local machine, and then issue the appropriate rpm command to
install or update them.  But often an updated package is offered with
multiple releases (perhaps there can be multiple versions too), leading to
the situation I described above, where rpm's behavior depends on the order
that I list the packages to it.

Thanks!

-----
David Wolinski
MIT Lincoln Laboratory
PGP Public Key 0x34960C98 at pgpkeys.mit.edu:11371




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux