User:Immolo/sandbox/keyword flag management

From Gentoo Wiki
Jump to:navigation Jump to:search

/etc/portage/package.use, /etc/portage/package.accept_keywords and friends, are a great way to maintain a Gentoo way system. However, overtime these get forgotten about and can cause a user issues when they forget they set them.

This article explains how to find these issues and how to make them less likely to occur.

Comments

When adding a USE flag or keyword, it is always helpful to leave a comment to why it was set in the first place.

FILE /etc/portage/package.accept_keywords/scummvmp.a_k example
# Using ~amd64 package due to bug XXXX
games-emulation/scummvm
FILE /etc/portage/package.use/scummvmp.use example
# MIDI support
games-emulation/scummvm fluidsynth

package.accept_keywords

When unmasking packages from testing, only the version that is needed should be unmasked.

It is generally good practice to use the testing package until the stable version becomes greater than the testing version; then the system would switch back over to tracking the stable package.

FILE /etc/portage/package.use/engrampaExplicitly setting version example
# engrampa 1.28.1 has issues with extracting encrypted zip files
=app-arch/engrampa-1.28.2

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.