RedHat Package Manager

The RedHat Package Manager is a full featured open source package management system. For the full story take a look at their web site: http://www.rpm.org/.

A major part of RPM is a database of interdependancies between packages. Each package provides a set of capabilities and requires a set of capabilities. These capabilities can be package names, file names, or abstract capabilities and may contain version/release information. Dependancies consist of a list of capabilities with associated version information and relationships.

On a properly configured system all dependancies are satisfied. RPM will enforce these dependancies when updating the system as well (although it is possbile to --force the issue). It's possible to extract the dependancies via the RPM query functionality.

Things that we're interested in for the MakeUpdates and RPMcv scripts.

rpm -q --provides
List the capabilities that a package provides. Using the -p option it's possible to query an rpm file, rather then the installed database.
#rpm -q  --provides bash
bash2
bash = 2.04-21
#
rpm -q --requires
List the capabilities that a package needs. Using the -p option it's possible to query an rpm file, rather then the installed database.
#rpm -q --requires bash
mktemp
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
ld-linux.so.2
libc.so.6
libdl.so.2
libtermcap.so.2
/bin/bash
/bin/sh
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2)
libdl.so.2(GLIBC_2.0)
libdl.so.2(GLIBC_2.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpm -q
Get the current version and release of a package. Using the -p option it's possible to query an rpm file, rather then the installed database.
#rpm -q bash
bash-2.04-21
#

Things that we're interested in for the ApplyUpdates script.

rpm -U
Installs a package. If successful and there was a older version of this package, uninstall the old version.

The entire UWupdates package is based around determining the minimal sets of packages that must be updated at one time to keep the system up to date.