Use flags

From XPUB & Lens-Based wiki
Revision as of 22:38, 13 October 2008 by Michael Murtaugh (talk | contribs)

Use flags are options in Gentoo Linux's Portage system.

Typically, you can add a flag "globally" by editing:

  • /etc/make.conf

or by package name by editing:

  • /etc/portage/package.use

Setting Use Flags in Portage

Generally you alter use flags by making changes to the file /etc/portage/package.use. Use a text editor as "superuser" to edit this file.

For instance to add jpeg and png support to ImageMagick, you need to add the following line somewhere (it doesn't matter where) to the package.use file:

media-gfx/imagemagick jpeg png

To explicitly disable a particular feature, put a dash (-) before the flag name, as in:

media-gfx/imagemagick jpeg png -tiff

This would then add jpeg and png support, but not include support for TIFF files.

Sometimes a particular use flag is used by many packages. To set such a flag for all software packages you install with portage, you can add them to the file /etc/make.conf. In that case, you would add the flag to the line that looks like USE="...", as in:

USE="-ipv6 gtk2 unicode"

<!> For more in information on Portage, check out Cal's post in the forum.