One of the great features that Gentoo Linux provides to its users is the ability to control how packages are treated by setting individual and global settings whenever you build them.
This means that you can enable or disable some options when you are compiling your applications so that unneeded features such as X support or XML support could be avoided.
Gentoo defines USE flags in three places:
- /etc/make.profile/make.defaults: global defaults. Do not change.
- /etc/make.profile/use.defaults: changes as packages are added or removed. Do not change.
- /etc/make.conf: user USE flags settings. Change this.
Despite you could manually edit and modify /etc/make.conf, there are a couple of utilities to facilitate this task: euse (command line based) and ufed (ncurses based).
Default USE settings can be checked by issuing…
euse -d
…and user USE flags by issuing…
euse -c
Let’s do something practical. Suppose you want to install MySQL with transaction support.
First of all, let’s see if MySQL ebuild has transaction (InnoDB) support by default:
etcat -u mysql
or…
emerge -pv mysql
As you can see from the output, InnoDB support is disabled by default. So let’s change this:
euse -E innodb
or…
USE=”+innodb” emerge -pv mysql
Now you are ready to emerge mysql as usual.
References
- Gentoo Guide to USE flags
- Database of USE flags
- man euse
- man ufed