Setting USE_EXPAND flags in package.use

This has apparently been supported in Portage for some time, but I only learned it recently from a gentoo-dev mail: you do not have to write down the expanded USE-flags in package.use anymore (or set them in make.conf)!

For example, if I wanted to set some APACHE2_MODULES and a custom APACHE2_MPM, the standard package.use entry would be something like:

www-servers/apache apache2_modules_proxy apache2_modules_proxy apache2_modules_proxy_http apache2_mpms_event ssl

Not as pretty/convenient as a ‘APACHE2_MODULES=”proxy proxy_http”‘ line in make.conf. Here is the best-of-both-worlds syntax (also supported in Paludis apparently):

www-servers/apache ssl APACHE2_MODULES: proxy proxy_http APACHE2_MPMS: event

Or if you use python 2.7 as your main python interpreter, set 3.4 for libreoffice-5.1 😉

app-office/libreoffice PYTHON_SINGLE_TARGET: python3_4

Have fun cleaning your package.use file

4 thoughts on “Setting USE_EXPAND flags in package.use”

  1. Did not know that and was able to use it immediately for LibreOffice 5.1, thank you!

  2. Would be nice to get the vim highlighting up to date with this.

    1. I use live ebuild gentoo-syntax-99999999 (mostly for historical reasons), and highlighting works fine, so I guess it is time to request a new tarball of gentoo-syntax 🙂

  3. “Tip of the day” feature in portage would come in handy…

Comments are closed.