Gentoo:USE flags
From Linux 101, The beginner's guide to all things Linux.
USE flags are in reality a very simple thing. However, they can have a tremendous impact on your system.
Generally speaking, USE flags tells emerge that when it compiles packages, to include optional support for things.
Different distributions handle this differently, of course. Some would just provide you with support for everything compiled in. This is fine, but if you don't use these features, then you're just wasting system resources. Some do not compile any in, which is limiting, because you may want to use the optional features. Other distributions, like Debian, break one actual package into many packages. Gentoo's method is just to keep one package, but to help you choose your features with the USE flags.
You define what use flags to use on your system in the make.conf file. You can do this by hand, but there's also a small console utility program to help with them.
- #
emerge ufed; ufed
ufed, or the USE flag editor, is a small program that lists out use flags, and their purpose.
For a text file listing USE flags, see /usr/portage/profiles/use.desc.
[edit] Updating USE flags
Here's an example of a problem emerge used to suffer from:
- You set up your system to have the following USE flags: qt kde
- You emerge programX that uses the USE flags: qt kde alsa
- Later (days/months/whatever) you decide to add the alsa USE flag in.
- You run emerge -Du world, but programX doesn't notice it has a new USE flag that it should be recompiled to take advantage of.
In short, emerge had no support to check to see if it should re-emerge a program because a USE flag that affects it has been changed (turned on or off).
However, that is no longer true. If you run emerge with the --newuse (-N) command-line option, emerge will search out for installed programs that have had USE flag changes.
|
The Portage Articles Series |
|---|
| portage | emerge | make.conf | use flags | cflags | Overlays |
| Navigation: Gentoo Index |

