USE flags

From LQWiki
Jump to: navigation, search

USE flags are used by Gentoo's portage and emerge, to configure which features should be compiled into the software's binary. This allows software installed to have only the features needed by the user leading to a faster more stable environment.

Setting flags

/etc/make.conf

The USE flags are set in /etc/make.conf, where other portage features can be tweaked. A simple setting could look like:

USE="gnome gtk2 dvd -kde"

These flags tell portage to compile packages optimized for Gnome and with dvd functionality, the "-kde" means kde functionality will not be compiled into packages (if option between gnome and kde exists for a package).

ufed

There are a huge number of possible use flags too numerous to list here each tweaking package features to a users precise requirements. To help there is a utility called ufed (Use Flag Editor), which uses a simple text-based UI to select USE flags. This can be installed using emerge:

emerge -av ufed

The selections are written to /etc/make.conf in alphabetical order.

Updating system after USE flag change

If after installation of a package the USE flags are altered, the system can be updated to reflect the changes using emerge:

emerge --newuse --update --ask --deep world

See also