World set (Portage)
Packages belonging to the world set are listed by default into the /var/lib/portage/world file.
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.
Dependencies already listed in this file can be found using the qdepends -Q command and be collected in a file say /tmp/deselect:
#!/bin/bash while read i ; do \ if [ -n "$(qdepends -Q $i)" ]; then \ echo '' ; echo 'checking '$i ; if [ -n "$(emerge -p --quiet --depclean $i)" ]; then \ echo $i' needs to stay in @world' else echo $i' can be deselected' echo $i >> /tmp/deselect fi fi done < /var/lib/portage/world
Entries collected in /tmp/deselect can be cross-checked using the
emerge -pv --depclean $(< /tmp/deselect)
The emerge --deselect option will remove these entries without unmerging them.
emerge --ask --deselect $(< /tmp/deselect)
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 <atom>
It will add the atom to the /var/lib/portage/world file without compiling it again.
- Knowledge Base: Remove orphaned packages - The process of finding orphaned dependencies explained.
- The system set package set.
- The selected set package set.