Two Applications For Easy Management Of ‘USE’ Flags In Gentoo
The feature I like the most in the Gentoo operating system is the flexibility available through the use of ‘USE’ flags while installing the software packages. Its one of the features which you feel fortunate to have found out, wondering how you could have lived without it in the other operating systems.
Many operating systems(Debian/Ubuntu, Gentoo) handle the first level of dependency quite efficiently - the dependencies which are essential for a package to work are automatically resolved and installed whenever you install the package with ‘apt’ in Debian/Ubuntu or ‘emerge’ in Gentoo. yum, urpmi, yast etc are trying to achieve the same but they are still not as robust as the earlier two. The second level of dependencies that are not essential for the package to work but can add to its core functionality are still managed by the users manually in every operating system(AFAIK) except in Gentoo. Its just one more thing to worry less about for the Gentoobies.
If you want every package that can provide functionality related to MySQL software to have such support included in it when it is installed, then just add the ‘mysql’ keyword to the ‘USE’ flag in the ‘/etc/make.conf’ file:
USE=’gtk gnome kde qt apache mysql‘
MySQL support will now be added to every application that has such bindings available for it. Now you can Install new applications or upgrade the entire system never bothering about missing MySQL support in any of the applications. Similarly you can chose to include support for Java, Apache, alsa etc for the applications that support them. Have a look at the Gentoo website for a complete list of USE flags that are supported by Gentoo or run the following command from a Gentoo system:
USE flags can also be used to disable a certain optional functionality(if it will be installed by default but you don’t want it, for example) by prefixing the flag with a minus-sign(”-”):
media-sound/banshee ipod njb -aac real
In this case, aac support will NOT be installed for the Banshee application.
Adding a USE flag in the /etc/make.conf will globally enable it for the entire Gentoo system and will apply to every application that is installed on it. To enable/disable USE flags on an application to application basis(you want MySQL support in one application but not in the other), you can add a separate line for every application in /etc/portage/package.use file:
=dev-lang/php-5.0.5-r5 cli cgi apache apache2 mysql dba gd
These USE flags will be applied only to the PHP package and only for the version specified in the above line. To enable the use flags for any version of a package, drop the version number:
media-sound/banshee ipod njb aac real
This installs the optional support available for ipod, aac format, real media in the Banshee music player. For more infornation on USE flags, see this.
Two applications that simplify the management of USE flags in Gentoo are:
- ufed
- profuse
Install them using the following command:
The first one is console based and the second one uses a graphical interface. Though its not terribly difficult to manually add/remove the USE flags by directly editing the /etc/make.conf file, I find these two applications to provide a convenient interface to simply search through the list of flags available and enable/disable them with a single click/key press. Below are screenshots of these applications.
‘ufed’ console based USE flag editor

‘profuse’ graphical USE flag editor

Related Posts:
Readers who viewed this page, also viewed:
- Coming soon. (Gathering data)