Skip to content

Latest commit

 

History

History
159 lines (95 loc) · 4.18 KB

chuse.pod

File metadata and controls

159 lines (95 loc) · 4.18 KB

NAME

chuse - Portage USE flags manager

SYNOPSIS

chuse [-f|--force] atom [[modifier]flag ...] [--because reason]

chuse atom

chuse (-h|--help)

chuse (-v|--version)

chuse --dump

chuse --load file

DESCRIPTION

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.

OPTIONS

atom

A valid package atom.

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).

-f --force

Force writting changes even if no ebuild seems to satisfy the given atom or none of the matched ebuilds seems to accept one of the given useflags.

--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

EXAMPLES

By default, chuse uses the following hierarchy pattern: /etc/portage/package.use/<category-name>/<package-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.bak # Export the backup to the new hierarchy

If you want 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}" # One file per category
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/{cat}/{pkg}" # This is the default
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/chuse" # One file dedicated to chuse

{cat} and {pkg} will be respectively replaced by the category name and the package name of the atom you want to alter USE flags.

You can also set this file pattern in the file /etc/chuse.conf

[package.use]
  file-pattern = /etc/portage/package.use/{cat}

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

You can omit the package category:

$ sudo chuse qtile +dbus
$ chuse '=qtile-0.10.6'
# [2017-01-12T07:34] Set dbus
x11-wm/qtile dbus

Obviously this won't work if the package name is ambiguous:

$ chuse screen
Error: This atom is ambiguous, please specify the package category

As well, the existence of ebuilds matching the atom is checked. You can use the --force (shortly -f) option to disable this behavior:

$ sudo chuse unexisting/package +foo -bar
Error: This atom does not match any existing ebuild. Use --force option
to proceed anyway.
$ sudo chuse -f unexisting/package +foo -bar

As of version 1.2, useflags existence is also checked:

$ sudo chuse dev-db/postgresql python -fanfan_la_tulipe dartagnan
Error: No ebuild matched by the given atom accepts such use flags:
dartagnan, fanfan_la_tulipe. Make sure you did not make a typo, or use
--force option to proceed anyway.
$ sudo chuse -f dev-db/postgresql python -fanfan_la_tulipe dartagnan

BUGS

Please report bugs on gitlab https://gitlab.com/apinsard/chuse/issues

AUTHOR

Antoine Pinsard <[email protected]>

VERSION

1.2

SEE ALSO

portage(5)