World set (Portage)

From Gentoo Wiki
Jump to: navigation, search

The world set, also referred to as @world in Portage development, encompasses the system set and the selected set.

Packages belonging to the world set are listed by default into the /var/lib/portage/world file.

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 using Portage.

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.

Checking

The emaint command can be used to see if any problems exist in the world file:

user $/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 --oneshot (-1) option for emerging dependencies (--oneshot allows to install a package without integrating it in the dependency graph).

Dependencies already listed in this file can be found using the qdepends -Q command and be collected in a file say /tmp/deselect:

user $while read i ; do if [ -n "$(qdepends -Q $i)" ]; then echo $i >> /tmp/deselect ; fi; done < /var/lib/portage/world

Entries collected in /tmp/deselect can be cross-checked using the --depclean option:

user $emerge -pv --depclean $(cat /tmp/deselect)

The emerge --deselect option will remove these entries without unmerging them.

root #emerge --ask --deselect $(cat /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:

root #emerge --ask --noreplace <atom>

It will add the atom to the /var/lib/portage/world file without compiling it again.

See also

External resources