The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Package:Chuse"
m (Added ebuild footer) |
(Added screenshot) |
||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
== Installation == | == Installation == | ||
{{console|body=###i## emerge -av app-portage/chuse}} | |||
The latest version (1.1) requires {{c|dev-python/appi}} which is still in experimental development state. If you wish to avoid this dependency, you can mask {{c|>{{=}}app-portage/chuse-1.1}} and use version 1.0 which should still be supported a while. | |||
{{console|body=###i## emerge -av chuse}} | {{console|body= | ||
###i## echo '>=app-portage/chuse-1.1' >> /etc/portage/package.mask | |||
###i## emerge -av app-portage/chuse | |||
}} | |||
Major changes brought by 1.1 are : | |||
- Check if ebuilds matching the given atom exist | |||
- Allow to omit the package category if it is not ambiguous | |||
- Configuration of the "package.use file pattern" in {{c|/etc/chuse.conf}} rather than environment variable | |||
- Coloration of useflags | |||
== Configuration == | |||
By default, {{c|chuse}} uses the following hierarchy pattern: {{c|/etc/portage/package.use/<cat-name>/<pkg-name>}} | By default, {{c|chuse}} uses the following hierarchy pattern: {{c|/etc/portage/package.use/<cat-name>/<pkg-name>}} | ||
Any file matching this pattern should contain the rules for the package ''<pkg-name>'' from the category ''<cat-name>''. | |||
=== If you don't use this hierarchy pattern === | === If you don't use this hierarchy pattern === | ||
Line 34: | Line 46: | ||
{{file|name=~/.bashrc|desc=PACKAGE_USE_FILE_PATTERN examples|body= | {{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" # All in one file | ||
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/ | PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/{cat}" # One file per category | ||
PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/ | 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 | PACKAGE_USE_FILE_PATTERN="/etc/portage/package.use/chuse" # One file dedicated to chuse | ||
}} | }} | ||
{{c| | {{c|{cat} }} and {{c|{pkg} }} would be respectively replaced by the category name and the package name of | ||
the atom you want to alter USE flags. | the atom you want to alter USE flags. | ||
Since version 1.1, you can now configure this in {{c|/etc/chuse.conf}} which may be more convenient: | |||
{{file|name=/etc/chuse.conf|body= | |||
[package.use] | |||
file-pattern = /etc/portage/package.use/{cat} | |||
}} | |||
==== If you want to adopt this hierarchy pattern ==== | ==== If you want to adopt this hierarchy pattern ==== | ||
Line 56: | Line 75: | ||
== Usage == | == Usage == | ||
chuse <atom> [[modifier]<flag> ...] [ | |||
chuse [-f|--force] <atom> [[modifier]<flag> ...] [--because <reason>] | |||
Alter use flags. By default, if the given atom doesn't match any existing ebuild, | |||
an error will be raised. Use -f/--force option to disable this behavior. If no flag | |||
is specified, the current rules matching the underlying atom will be displayed. | |||
chuse <atom> | |||
Print current flags set and history. | |||
chuse (-h|--help) | |||
Print this help.chuse (-v|--version) | |||
Print version information. | |||
chuse --dump | |||
Print all contents of /etc/portage/package.use | |||
chuse --load <file> | |||
Load a backup file to the /etc/portage/package.use hierarchy. | |||
atom: | atom: | ||
A valid package atom. | |||
A | |||
modifier: | modifier: | ||
One of : | One of: +, -, %. (% means reset default). If omitted, + is assumed. | ||
flag: | flag: | ||
A USE flag (validity won't be checked). | A USE flag (validity won't be checked). | ||
reason: | reason: | ||
The reason why you changed these | The reason why you changed these US flags (so that you remember why you set this | ||
and if you can reset default in the future for instance. | |||
== Examples == | == Examples == | ||
Line 90: | Line 110: | ||
{{console|body=###i## chuse ">=www-client/firefox-37.0.1" system-cairo -system-icu %system-jpeg}} | {{console|body=###i## chuse ">=www-client/firefox-37.0.1" system-cairo -system-icu %system-jpeg}} | ||
== Screenshots == | |||
[[File:Chuse-screenshot.png|300px|Chuse 1.1 Screenshot]] | |||
{{EbuildFooter}} | {{EbuildFooter}} |
Latest revision as of 14:12, January 15, 2017
Chuse
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
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 its 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
.
Installation
root # emerge -av app-portage/chuse
The latest version (1.1) requires dev-python/appi
which is still in experimental development state. If you wish to avoid this dependency, you can mask >=app-portage/chuse-1.1
and use version 1.0 which should still be supported a while.
root # echo '>=app-portage/chuse-1.1' >> /etc/portage/package.mask root # emerge -av app-portage/chuse
Major changes brought by 1.1 are :
- Check if ebuilds matching the given atom exist
- Allow to omit the package category if it is not ambiguous
- Configuration of the "package.use file pattern" in /etc/chuse.conf
rather than environment variable
- Coloration of useflags
Configuration
By default, chuse
uses the following hierarchy pattern: /etc/portage/package.use/<cat-name>/<pkg-name>
Any file matching this pattern should contain the rules for the package <pkg-name> from 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 PACKAGE_USE_FILE_PATTERN
environment variable (eg. in your bashrc).
~/.bashrc
- PACKAGE_USE_FILE_PATTERN examplesPACKAGE_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}
would be respectively replaced by the category name and the package name of
the atom you want to alter USE flags.
Since version 1.1, you can now configure this in /etc/chuse.conf
which may be more convenient:
/etc/chuse.conf
[package.use]
file-pattern = /etc/portage/package.use/{cat}
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:
root # chuse --dump > /root/package.use.bak # Concat all your rules in one file root # chuse --load /root/package.use.bak # Parse the file to organize your package.use
To avoid mistakes, chuse --load
will ask you before erasing /etc/portage/package.use
.
Usage
chuse [-f|--force] <atom> [[modifier]<flag> ...] [--because <reason>] Alter use flags. By default, if the given atom doesn't match any existing ebuild, an error will be raised. Use -f/--force option to disable this behavior. If no flag is specified, the current rules matching the underlying atom will be displayed. chuse <atom> Print current flags set and history. chuse (-h|--help) Print this help.chuse (-v|--version) Print version information. chuse --dump Print all contents of /etc/portage/package.use chuse --load <file> Load a backup file to the /etc/portage/package.use hierarchy.
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 US flags (so that you remember why you set this and if you can reset default in the future for instance.
Examples
Show the flags you altered for firefox:
user $ chuse www-client/firefox
Add system-cairo, remove system-icu and reset system-jpeg for firefox >= 37.0.1:
root # chuse ">=www-client/firefox-37.0.1" system-cairo -system-icu %system-jpeg
Screenshots