It is the world file, together with the profile and /etc/portage (including make.conf) settings, that defines what software is installed on a system.
Later, when a world update is requested (through emerge -uDN @world or similar command), Portage will use the world file as the base for its update calculations.
The emaint command can be used to see if any problems exist in the world file:
/usr/sbin/emaint --check world
Emaint: check world 100% [============================================>]
Keep it clean
In order to avoid problems in dependency resolution when updating the system, the /var/lib/portage/world file should contain as few dependencies as possible. So use the
-1) option for emerging dependencies.
#!/bin/bash while read i ; do \ if [ -n "$(qdepends -Qq $i)" ]; then \ echo '' ; echo 'checking '$i ; if [ -n "$(emerge -p --quiet --depclean $i)" ]; then \ echo $i' ok' else echo $i' should be deselected' fi fi done < /var/lib/portage/world
The emerge --deselect option will remove these entries without unmerging them.
emerge --ask --deselect <package>
In case emerge --depclean -p indicates some needed or wanted package would be unmerged, those can be re-added using the --noreplace option:
emerge --ask --noreplace <package>
It will add the package to the /var/lib/portage/world file without compiling it again.
- World set (Portage) — encompasses the system set and the selected set.
- Regenworld — regenerates the Portage world file by checking the Portage log file for all actions performed in the past.