check that the world file (in /var/cache/edb/ for portage-2.0.50, /var/lib/portage for portage-2.0.51) contains those packages. If it doesn't or is empty you can fix it by running this as root:

Code:

regenworld

This uses your /var/log/emerge.log to regenerate your world file. It may not work if the log has been deleted or you are using an unstable version of portage. If this is the case, there is a workaround using qpkg which is part of gentoolkit*.

This will create a new world file which lists all installed packages. You should edit the world file afterwards to remove unnecessary packages, this can be done with the dep script or manually.

* Note that qpkg is deprecated in favour of equery. However, the output of the equivalent equery command

Code:

equery -C -q list

is not compatible with the world file as it also gives the version number of the installed packages. You can find qpkg in /usr/lib/gentoolkit/bin/ and /usr/share/doc/gentoolkit-<version>/deprecated/qpkg/ if you have gentoolkit-0.2.0 and gentookit-0.2.1, respectively.