Re: how can I merge and deprecate packages

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

 




I'm not sure I understand about the reboot you mention,


Its just that in my system/environment, a reboot of the system must
occur after every invocation of 'rpm'.
Sounds like a serious problem that ought to be looked into, but that's a different story.

This implies that whatever
solution is suggested, it has to be atomic in nature.


but isn't what
you are looking for essentially the "Obsoletes" mechanism? You do

Obsoletes: PkgA PkgB
in NewPkg.spec.


Yes, that could be.

Since its not defined in the Maximum RPM book. Where can I read more about
it?
I thought it was documented in Maximum RPM and/or the package doc files, but I couldn't find much information now. I wonder how I learned about it...

Anyhow, it's essentially as follows:

  1. 'rpm -U' is equivalent to 'rpm -i' on the package files specified,
     followed by 'rpm -e' of any older versions of those packages that
     are already installed.
     Note that even though -U is defined as the "upgrade mode", if will
     also happily do first-time installation of packages (The mode that
     *only* does upgrades is actually -F.)
  2. If variants of the packages that are not older are already
     installed, on the other hand, rpm -U will fail.
  3. Any package that has the same name as a package being installed,
     and either a lower version number or the same version number and a
     lower release number, is considered to be an older version.
  4. A package whose name is mentioned in the Obsoletes: of a package
     being installed, is also considered to be an older version.


(Actually, the logic is slightly more complex than this, but this is hopefully all you have to worry about right now.)

Simple examples:

   * If package A-1.0-1 was installed earlier, and you do 'rpm -U
     A-2.0-1.i386.rpm' leads to an operation equivalent to
     rpm -i A-2.0-1.i386.rpm
     rpm -e A-1.0.-1
   * If you do 'rpm -U A-1.0-2.i386.rpm' instead, this becomes:
     rpm -i A-1.0-2.i386.rpm
     rpm -e A-1.0.-1
   * If you try rpm -U A-1.0-1.i386.rpm' after either of the two above
     operations, you get a message saying that a newer version of A is
     already installed.
   * If package B-1.0-1 was installed instead, and the spec file of A
     has "Obsoletes: B", then 'rpm -U A-2.0-1.i386.rpm' will do
     rpm -i A-2.0-1.i386.rpm
     rpm -e B-1.0.-1
   * If A-1.0-1 *and* B-1.0-1 are installed (and A has "Obsoletes: B),
     you get
     rpm -i A-2.0-1.i386.rpm
     rpm -e B-1.0.-1 A-1.0-1


- Toralf







_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux