Changes

Jump to: navigation, search

Package:Chuse

3,558 bytes added, 5 years ago
First commit
{{Ebuild
|Summary=A USE flags manager
|CatPkg=app-portage/chuse
|Maintainer=pytony
|Homepage=http://github.com/apinsard/chuse
}}

Chuse stands for CHange USE. This is a Portage tool for managing your local USE flags (ie. set
within {{c|/etc/portage/package.use}}).

In contrast to its several equivalents, it is designed with a very specific goal: Make your
{{c|/etc/portage/package.use}} management easier. This means {{c|chuse}} does not handle other {{c|package.*}}
and ''focuses'' on {{c|package.use}}.

== Installation ==

Chuse is available from the [https://github.com/apinsard/sapher-overlay sapher overlay].

Once you have added this overlay through layman or whatever, just emerge {{c|chuse}}.

{{console|body=###i## emerge -av chuse}}

By default, {{c|chuse}} uses the following hierarchy pattern: {{c|/etc/portage/package.use/<cat-name>/<pkg-name>}}

This file would contain each rules for the package ''<pkg-name>'' in the category ''<cat-name>''.

=== If you don't use this hierarchy pattern ===

==== If you want to use your own current pattern ====

You can change this pattern by explicitely setting the {{c|PACKAGE_USE_FILE_PATTERN}}
environment variable (eg. in your bashrc).

{{file|name=~/.bashrc|desc=PACKAGE_USE_FILE_PATTERN examples|body=
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
}}

{{c|%(cat)s}} and {{c|%(pkg)s}} would be respectively replaced by the category name and the package name of
the atom you want to alter USE flags.

==== If you want to adopt this hierarchy pattern ====

You will have to backup your current USE flags in a file and reorganize the package.use hierarchy.
To achieve this, issue the following commands:

{{console|body=
###i## chuse --dump > /root/package.use.bak # Concat all your rules in one file
###i## chuse --load /root/package.use.bak # Parse the file to organize your package.use
}}

To avoid mistakes, {{c|chuse --load}} will ask you before erasing {{c|/etc/portage/package.use}}.

== Usage ==

chuse <atom> [[modifier]<flag> ...] [(--because|#) <reason>]

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 now
you can reset default for instance).

If no flag is specified, this will display the current rules matching the underlying atom.

== Examples ==

Show the flags you altered for firefox:

{{console|body=$##i## chuse www-client/firefox}}

Add system-cairo, remove system-icu and reset system-jpeg for firefox >= 37.0.1:

{{console|body=###i## chuse ">=www-client/firefox-37.0.1" system-cairo -system-icu %system-jpeg}}
wiki-staff
336
edits

Navigation menu