Version 2 (modified by james, 9 years ago)
--

Package updates in yum

Package update, simple

A new version is released upstream, or just within the repo. with local patch(es):

  • pkgA-1.2.3-4 is installed
  • pkgA-2.3.4-5 is available

In this case pkgA just updating the version in the package and rebuild, and pkgA will be updated to the new version. This is what happens 99% of the time.

Package rename

A new version is released, but it changes the name:

  • pkgA-1.2.3-4 is installed
  • pkgB-2.3.4-5 is available

The usual thing to do here is to have:

# pkgB-2.3.4-5 Obsoletes: pkgA <= 1.2.3-4

Now pkgA will be updated to pkgB. However note that pkgA-1.2.3-4 can be installed via. rpm, after pkgB is installed. You may want to have something like:

# pkgB-2.3.4-5 Provides: pkgA

...for compatibility with packages which "Requires: pkgA"

Package split

A package splits some of it's data into a sub-package:

  • pkgA-1.2.3-4 is installed
  • pkgA-2.3.4-5 is available
  • pkgA-foo-2.3.4-5 is available

This is a similar problem to the rename, except that we are renaming some of pkgA to one place and some to another (the same place):

# pkgA-foo-2.3.4-5 Obsoletes: pkgA <= 1.2.3-4 # pkgA-2.3.4-5 Obsoletes: pkgA <= 1.2.3-4

Now pkgA will be updated and pkgA-foo installed. Note that if you don't have the Obsolete in pkgA then it will work as a rename, which is probably not what you want.

Package merge

A package merges a sub-package into the main package:

  • pkgA-1.2.3-4 is installed
  • pkgA-foo-1.2.3-4 is installed
  • pkgA-2.3.4-5 is available

This is basically the same problem as a rename, so the solution is the same:

# pkgA-2.3.4-5 Obsoletes: pkgA-foo <= 1.2.3-4

Now pkgA will be updated and automatically remove the old pkgA-foo-1.2.3-4.