/etc/portage/package.use

From Gentoo Wiki
< /etc‎ | portage(Redirected from Package.use)
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.

/etc/portage/package.use provides a more fine grained per-package control of USE flags than the USE variable in /etc/portage/make.conf.

Note
/etc/portage/package.use can either be a single file or a directory containing per-package files.

With the default USE_ORDER setting, the /etc/portage/package.use file or directory will override individual package settings coming from all locations except for the USE environment variable.

Example

FILE /etc/portage/package.useExample with this location as a single file
# Globally disable the unwanted USE flags which were enabled by the profile
*/* -bluetooth -dbus -ldap -libnotify -nls -qt3support -udisks
 
# enable the offensive USE flag for app-admin/sudo
app-admin/sudo offensive
 
# disable mysql support for dev-lang/php
dev-lang/php -mysql 
 
# enable java and set the python interpreter version for libreoffice
app-office/libreoffice java PYTHON_SINGLE_TARGET: python3_9
FILE /etc/portage/package.use/openrctExample with this location as a directory
# Disable Vorbis support in OpenRCT2
games-simulation/openrct2 -vorbis

For more details see the Handbook.

Format

  • One DEPEND atom per line with space-delimited USE flags.
  • Comment lines begin with # (hash).
Note
See version specifier for information on how to format the package atoms.
Tip
If a package atom specifies a version, a comparison operator must be used.

Automatically generated content

emerge has the --autounmask option enabled by default (see man 1 emerge), so it can generate package.use settings as necessary to satisfy dependencies.

Finding USE flags set

With all the will in the world, mistakes will happen so below are some tips to help find a USE flag that was set and can no longer be found.

In this example, the lua USE flag was set for media-video/obs-studio, but is no longer required.

user $grep --recursive "lua" /etc/portage/

/etc/portage/package.use/obs:media-video/obs-studio nvenc browser speex fdk lua python qsv v4l vlc

/etc/portage/package.use/scummvm:games-engines/scummvm fluidsynth -fribidi lua mpeg2 sndio speech theora unsupported

/etc/portage/package.use/zz-automask:>=dev-lua/lgi-0.9.2-r100 lua_targets_luajit

It can be seen that the USE flag is in /etc/portage/package.use/obs and can be quickly added and removed.

External resources