Gentoo Wiki



What is Flagedit?

Flagedit is a simple application for setting useflags and keywords on a global or per-package basis. It's also a great timesaver.

Installing flagedit

emerge -av app-portage/flagedit

That's it! It'll pull in some dependencies, might take a while on some old machines since there are quite a few perl modules it depends on.

Using flagedit


In the simplest case


This lists all the global useflags (the combination of make.conf and your relevant make.profile). It's intelligent and works out everything properly, make.conf flags take priority over make.defaults.

Assuming you liked gnome and wanted to add it to make.conf, you would just do this

flagedit +gnome

And you'd probably want to remove kde from your flags.

flagedit -kde

Or as one command

flagedit -kde +gnome

Already a great timesaver huh?


For this example we'll choose gaim

emerge -pvO gaim

On my system I get this:

[ebuild   R   ] net-im/gaim-2.0.0_beta6  USE="crypt custom-cflags gtk msn nls perl spell ssl xscreensaver -avahi -bonjour -cjk -console -dbus -debug -doc -eds -gadu -gnutls -groupwise -gstreamer -meanwhile -mono -qq -sasl -silc -startup-notification -tcl -tk" 0 kB

Now those option are ideal for me, but some of you might want gadugadu support, and perhaps evolution integration (eds)

flagedit net-im/gaim gadu eds

Notice that the + is implicit now we're setting flags locally, we could prefix it with a plus if we so desired however.

Good practice would say that if we wanted to remove a flag from a package and that flag isn't in make.conf or make.profile, we should just do this

flagedit net-im/gaim %msn

Since it's not a global flag, this removes it from the package by resetting it to the default.

On the other hand, I have nls in my make.conf and while I'd be stupid to remove it for the gaim package, I could do that like this:

flagedit net-im/gaim -nls

Unkeywording packages

Flagedit can also edit keywords, either locally or for a given package. Here's how we'd set ACCEPT_KEYWORDS in make.conf to include ~x86.

flagedit -- +~x86

Magic. But it's typically more useful if you're running a stable system and want to un-keymask a specific package

flagedit net-im/gaim -- +~x86

Finally you can mix keywords and useflags

flagedit net-im/gaim +eds -msn -- -~x86

However, consider unmasking one package per version. Otherwise your system might become unstable and break at a subsequent emerge -DNu world.

flagedit =media-video/recordmydesktop- -- ~x86

Personally, I find it useful to use flagedit in combination with eix. Using eix, first find the exact package name and version. Then, it is easy to accomodate the flagedit syntax.


So flagedit is a great timesaver, no more editing package.use or package.unmask


Some other USE flag editors are ufed, profuse.

ufed shows an ncurses table with the USE flags, their descriptions and in which file they are set. It also has search capabilities.

profuse comes with an ncurses, gtk2, and dialog interfaces. It gives more information than ufed about USE flags, especially the local USE flags. It also has search capabilities.

Retrieved from ""

Last modified: Tue, 26 Aug 2008 17:45:00 +0000 Hits: 6,025