chuse - Portage USE flags manager
chuse atom [[modifier]flag ...] [--because reason]
chuse atom
chuse (-h|--help)
chuse (-v|--version)
chuse --dump
chuse --load file
Chuse stands for CHange USE. This is a Portage tool for managing your local USE flags (ie. set within /etc/portage/package.use).
In contrast to several equivalents, it is designed with a very specific goal: Make your /etc/portage/package.use management easier. This means chuse does not handle other package.* and focuses on package.use.
- atom
-
[version-selector]ebuild-cat/ebuild-pkg[-version][:slot]
Obviously, version-selector and version should never be set without the other.
- version-selector
-
One of: =, >, <, >, >=, <=.
- ebuild-cat
-
An ebuild category (validity won't be checked)
- ebuild-pkg
-
An ebuild package (validity won't be checked)
- version
-
A version of the underlying package (validity won't be checked).
- slot
-
A slot of the underlying package (validity won't be checked)
- modifier
-
One of: +, -, %. (% means reset default). If omitted, + is assumed.
- flag
-
A USE flag (validity won't be checked).
- reason
-
The reason why you changed these USE flags (so that you remember why you set this and if you can reset default in the future for instance).
- --dump
-
Print all contents of /etc/portage/package.use
- -h --help
-
Print help
- --load file
-
Load a backup file to the /etc/portage/package.use hierarchy.
- -v --version
-
Print version information
By default, chuse uses the following hierarchy pattern:
/etc/portage/package.use/I<cat-name>/I<pkg-name>
That is, one directory per package category, one file per package.
If you don't use this hierarchy pattern and want to adopt it:
chuse --dump > /root/package.use.bak # Concat all your rules in one file
chuse --load /root/package.use.back # Export the backup to the new hierarchy
If you cant to setup your own hierarchy pattern, you can change the pattern by explicitely setting the PACKAGE_USE_FILE_PATTERN environment variable (eg. in your bashrc).
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use" # All in one file
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/%(cat)s" # One file per category
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/%(cat)s/%(pkg)s" # This is the default
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/chuse" # One file dedicated to chuse
Add system-cairo, remove system-icu and reset system-jpeg for firefox >= 37.0.1: $ sudo chuse ">=www-client/firefox-37.0.1" +system-cairo -system-icu %system-jpeg
Add offensive for sudo:
$ sudo chuse app-admin/sudo offensive --because much cooler
Show the flags you altered for sudo:
$ chuse app-admin/sudo
# [2015-04-18T11:54] Unset sendmail
# [2015-04-18T11:56] Set offensive
# much cooler
app-admin/sudo offensive -sendmail
Please report bugs on github https://github.com/apinsard/chuse/issues
Antoine Pinsard <[email protected]>