White Paper: Changes in RPM 3.0


< Prev Contents Next >

Enhancements for installers

Previous versions of RPM dealt only with a single package at a time when installing, upgrading and/or erasing packages. There are several problems with that approach. First, RPM installed packages in exactly the same order that the user specified. That means the user was required to identify package prerequisites sufficiently to manually reorder command line arguments so that prerequisites were installed before packages that needed them. Second, a failure of installation (e.g. because of insuffcient disk space) of some package did not cause the packages installed previously to be uninstalled.

One of the most noticeable new features in RPM 3.0 is disk space checking. Before installing any packages, RPM now ensures that the system has enough free space for all of the new packages which are being installed. If there is not enough free space available, RPM reports which filesystems need more space, and how much.

The major difficulty in implementing disk space checking was handling symbolic links correctly. The original implementation of the installed package database stored file names as absolute paths. There was no way to know whether two paths referred to the same object or not. Consequently, the installed package database format was changed to save relative file names, and all file name paths are dynamically checked. That permits RPM 3.0 to recognize that two file name paths refer to a single file in many cases.

The install code within RPM 3.0 has been almost entirely rewritten in order to support the above functionality. Each set of packages to be installed during an invocation of RPM is now grouped into an entity called a transaction set. Within a transaction set, packages are reordered to satisfy prerequisite dependencies. The resource requirements of the entire transaction set are checked on install, upgrade, or erase operations before installing any package. By performing system-wide consistency checks on the entire operation set, RPM can report errors which will occur before starting any of the work.

Finally, several new features were added to give an installer a finer control over where and how files are installed. The leading part of individual file names may now be changed even for non-relocatable packages. A new "--excludepath" option has been added in order to prevent files from being installed in excluded locations.


< Prev Contents Next >