|General • Portage • Wiki|
What is a USE flag?
In Gentoo a USE flag is a representation of an option, a global setting for your final system. USE flags affect how many of the packages on your system will build.
As an example, mail-client/mutt-1.5.11 offers eighteen flags. Some flags enable or disable compile-time options: pop, imap and nntp all control compile-time options. The mutt source file contains all the code for these options; the flag merely enables or disables them. Without the pop and imap flags, for instance, mutt can only read mail stored in local files.
Some flags enable an application feature that requires certain commands or libraries: gdbm, berkdb, ssl and sasl all enable features that require certain userspace libraries such as Sleepycat DBM or OpenSSL. These dependencies may, in turn, depend on other software packages as well.
Some flags fix bugs. These are usually localized (see below) and temporary: The buffysize flag description reads: "Enables buffysize workaround, see bug #72422."
Choosing The right USE flags for you
"How do I choose the right USE flags for me?" you ask.
Well, choosing the right USE flags, although very important, is also quite simple. First, consult the list of USE flags available locally at /usr/portage/profiles/use.desc or online at the Gentoo-Portage USE Flag Listing. The description of each use flag should help you decide which to choose. If you are not sure leave it out; there are some default USE flags set for you already..
Viewing USE flag descriptions using grep
Using grep, you can easily find out what a USE flag means. Just use this (replace the word "useflag" with the USE flag you're searching for):
grep -i "useflag - " /usr/portage/profiles/use.desc
If that does not return any results, you can search package-specific USE flags as well:
grep -i "useflag - " /usr/portage/profiles/use.local.desc
Viewing a package's current USE flags
To view what USE flags would be used to install a package with your current settings:
emerge -pv package
eix -e package
if you don't have eix, see TIP Speed up searches in portage#Possibility_Nr._2:_EiX
Setting your USE flags
Now that you have chosen what flags you wish to use it is time to place them somewhere. There are two ways to edit your USE flags. One is with a specific USE flag-editing program: these will automatically edit your make.conf for you. The second method for editing your USE flags is to do it manually.
euse - Part of the gentoolkit package
euse is a good way to handle USE Flags. Read the euse MAN page.
ufed - Use Flag Editor
ufed will show you which flags have been specified by default and a description for each USE flag. Within the program you can edit which USE flags will be used. But without a detailed description per USE flag, ufed is still weak.
A good replacement for ufed is profuse. This program has a GUI, relatively good descriptions for USE flags and does not make such big mistakes in writing the make.conf as ufed. But, as always when changing config-files, it is recommended to make a backup of the /etc/make.conf before using ufed or profuse.
You may use an editor of your choice to manually edit your USE flags in /etc/make.conf. You alter the USE="" line in order to change your use flags. To enable a flag simply add it to the USE line: do not prefix the flagname with a plus sign, e.g. use kde, but not +kde. To disable, add it with a minus sign as a prefix: -kde.
The file /etc/portage/package.use can enable and disable flags on a per-package basis. This allows the user fine-grained control over package compilation without a drastic increase in the number of USE flags:
net-irc/xchat -perl -python net-p2p/bittornado -gtk www-client/mozilla-firefox java mozdevelop
In the above example:
- X-Chat will be installed without built-in Perl and Python interpreters,
- BitTornado will be installed without a Python-GTK GUI interface, and
- Mozilla Firefox will be built with Java support and the Venkman web developers' features.
Though emerge fully supports package.use, not all portage-related tools do: use caution.
Default USE flags
The current default USE flags for an x86 Linux system:
USE="alsa apm arts avi bitmap-fonts cups eds emboss encode fortran foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ogg oggvorbis opengl oss pdflib png qt quicktime sdl spell truetype truetype-fonts type1-fonts vorbis X xml2 xmms xv"...
USE="alsa apache2 apm arts avi cups eds emboss encode esd foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mp3 mpeg nptl ogg opengl oss pdflib png qt quicktime sdl spell truetype udev vorbis X xml xmms xv"...
USE="gdbm gpm libg++ nptl nptlonly ppds udev unicode"...
The 2006.1 profile is comparatively smaller because 2006.1 introduced the desktop and server subprofiles. While the server subprofile isn't officially supported at the current time, the separate desktop subprofile allows servers to use a reduced basic profile with few USE flags, while desktop users can use the desktop subprofile which enables many of the graphical and other options that a desktop user would expect.
This system removed a previous problem where server users would have to deal with turning off a large number of USE flags that they never wanted. For example, the defaukts included graphical USE flags that would cause X, Gnome or KDE to be installed, packages seldom used in servers.
There is a symbolic link /etc/make.profile/ that points to a directory such as /usr/portage/profiles/default-linux/x86/2005.1/ (for older installations, the name may be /usr/portage/profiles/default-x86-2004.0/ or /usr/portage/profiles/default-x86-1.4/). The file make.defaults in your make.profile folder dictates the default USE flags. Look at the other files in that folder while you are at it. Some people actually prefer to make their own profiles instead of editing /etc/make.conf.
USE flag definitions
Any USE flag's exact effect may be a mystery without looking at the ebuild but here some general descriptions for most use flags:
- USE Flags explained
- http://gentoo-portage.com has definitions for some local USE flags; select a package and click the link to the USE flags for that package to see the descriptions
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.