Preserve-libs

The FEATURES=preserve-libs setting will cause portage to preserve libraries when sonames change during upgrade or downgrade, only as necessary to satisfy shared library dependencies of installed consumers. Preserved libraries are automatically removed when there are no remaining consumers, which occurs when consumer packages are rebuilt or uninstalled. Ideally, rebuilds are triggered automatically during updates, in order to satisfy slot-operator dependencies. Before emerge exits after installing updates, if there are remaining preserved libraries because slot-operator dependencies have not been used to trigger automatic rebuilds, then emerge will display a message like the following:

!!! existing preserved libs: >>> package: sys-libs/libfoo-1 * - libfoo.so.1 *     used by /usr/bin/bar (app-foo/bar-1) Use emerge @preserved-rebuild to rebuild packages using these libraries

WARNING:
 * Even though preserve-libs makes it unnecessary to use revdep-rebuild (provided by gentoolkit) for most common updates, it is still a good practice to run `revdep-rebuild -ip` after updates, in order to check if there are any broken library dependencies that preserve-libs was not able to handle. For example, see bug 459038.

If preserve-libs is not enabled in FEATURES, then users need to manually run revdep-rebuild in order detect broken library dependencies and rebuild the appropriate packages. Note that libraries preserved by preserve-libs (or alternatively by the preserve_old_lib function of eutils.eclass) prevent breakage that would otherwise be detectable by revdep-rebuild. Therefore revdep-rebuild (without special arguments) is not useful for rebuilding consumers of preserved libraries. Instead, if preserve-libs is enabled, then emerge will advise the user to run `emerge @preserve-rebuild` when necessary. Alternatively, if preserve-libs is not enabled and the preserve_old_lib function from eutils.eclass has been called by an ebuild in order to preserve a library, then the user will receive an ewarn message like the following:

* Old versions of installed libraries were detected on your system. * In order to avoid breaking packages that depend on these old libs, * the libraries are not being removed. You need to run revdep-rebuild * in order to remove these old dependencies. If you do not have this * helper program, simply emerge the 'gentoolkit' package. * *   # revdep-rebuild --library 'libfoo.so.1' && rm 'libfoo.so.1'"