Project:Portage/FAQ

How can "blocks" between packages be resolved?
See the Blocked Packages section in the Gentoo Handbook.

Why is it that emerge does not update all packages?
By default, the dependency graph may not include some packages. For example, it will not include any packages that are listed in the output of. It will also not include any build time dependencies for installed packages or binary packages. If you would like to include such build time dependencies even though they are not strictly required, use. You can set  in /etc/portage/make.conf if you would like this option to be enabled by default. If you would like a specific package to be updated in any case, you can use  to have it added to the world set.

After running, it is a good idea to use   to see if there are any packages that it would remove. If that command shows a package that you would like to keep, use  to have it added to the world set.

How can I check for reverse dependencies of a package, to know if it can be safely uninstalled?
Run  to see if there are any reverse dependencies for matched packages.

Why does emerge --depclean sometimes remove system packages?
For system dependencies that are specified as virtuals, such as virtual/editor, it's common to have multiple packages installed that are capable of satisfying the dependency. In this case, redundant packages may be removed by  unless they are explicitly added to the world set. You can use  to have a package added to the world set, and this will guarantee that this package will not be removed by.

Why doesn't emerge account for reverse dependencies sometimes?
Complete accounting for reverse dependencies is time-consuming, and many users would be likely to complain about poor performance if this was the default behavior. So, reverse dependencies will often be neglected by dependency calculations unless the  option is enabled. You can set  in /etc/portage/make.conf if you would like this option to be enabled by default. Refer to the  manual page (run  ) for more information about the   option.

Can I mount the portage tree (/usr/portage) via NFS?
It is possible to share the portage tree (/usr/portage) over NFS so that  only needs to be run on an NFS server. However, even though NFS clients do not need to run, they must run   each time that the portage tree is updated since otherwise their dependency calculations will slow down due to their metadata cache (located in /var/cache/edb/dep) becoming stale.

If you encounter problems with an NFS setup it is important that you ensure you have the proper locking daemons on both the NFS client machines and the NFS server machine. Portage uses hardlinks over NFS in an attempt to lock files; if the locking daemon fails to lock files Portage may complain about failed or stale locks. There is a script /usr/lib/portage/bin/clean_locks that can be used to clean out old lockfiles.

Why does emerge display "waiting for lock" messages?
The most common reason is due to  which is enabled by default in /usr/share/portage/config/make.globals. Set  in /etc/portage/make.conf if you would like to disable this feature. Refer to the make.conf manual page (run ) for more information about FEATURES.

If the  is invoked multiple times concurrently, or if   is on a shared network file system, this may also trigger similar "waiting for lock" messages. Such locks are necessary in order to prevent interference between concurrently running processes.

Why does the @preserved-rebuild set contain packages that have already been rebuilt?
This is a common problem which indicates that the build system for the given ebuild causes the package to inappropriately link against the old (preserved) version of the library, instead of the new one. As a workaround, you can manually remove the old library (such as libreadline.so.5.2) and then run  in order to rebuild the packages which linked against it. A list of all preserved libraries may be obtained from.

When packages are built in parallel with the --jobs option, why aren't some packages installed immediately after they have finished building?
As a safety precaution, installation actions for system packages and their deep dependecies are executed only when no other packages are building. This behavior is required in order to avoid cases like |bug 256616 (unspecified system dependencies) and |bug 259954 (temporarily unsatisfied system dependencies).

Why doesn't emerge --pretend output show the correct SLOT for a package with USE=multislot enabled?
Since ebuilds that support USE=multislot violate established rules about "constant metadata", cached SLOT value differs from the SLOT value that you will actually get once the package is installed. There is nothing portage can do about this except to implement an extension such as |bug #174407.

How do I configure environment variable settings that apply only to specific packages?
Put an entry such as "sys-libs/glibc debug.conf" in /etc/portage/package.env, and put your variable settings in /etc/portage/env/debug.conf (using the same format as make.conf). An example debug.conf might appear as follows:

CFLAGS="${CFLAGS} -ggdb" CXXFLAGS="${CXXFLAGS} -ggdb" FEATURES="${FEATURES} installsources splitdebug"