flagedit is a CLI USE flag editor for Gentoo Linux. It let you edit the use flags of /etc/make.conf, as well as the /etc/portage/package.use file.
features :
2009.01.16 Version 0.0.8. make flagedit compatible with directories support ( as per bug 241668 )
2005.12.26 Version 0.0.7. The help fits in 80 columns
2005.11.24 Version 0.0.6. some improvments
2005.11.15 Version 0.0.5. some improvments
2005.10.14 Version 0.0.2. An ebuild is available for gentoo linux.
2005.09.29 New version : now warns if the flag is not a valid one. More features also
2005.07.24 just did this web page.
This is just the raw output of flagedit --help, but I think it's self-explanatory :
flagedit allows you to edit the use flags or the keywords for a particular
ebuild, or for the whole system. a backup is done for each modified file, named
file.old.
Usage: flagedit [PACKAGE] [ACTIONS | -- KEYWORD_ACTIONS] [ OPTIONS ]
Examples:
flagedit net-im/amsn --show # shows the use flag set for net-im/amsn
flagedit net-im/amsn +gnome # adds the gnome use flag to net-im/amsn
flagedit net-im/amsn -kde +xmms # adds the xmms use flag and set the -kde one
flagedit net-im/amsn %kde # reset the kde use flag (it's removed from the line)
flagedit %kde # reset the global use flag (it's removed in make.conf)
flagedit +gnome -qt # add gnome and -qt in make.conf
flagedit net-im/amsn -- %x86 # reset the x86 keyword for net-im/amsn
flagedit net-im/amsn -- +~ppc +~x86 # adds the ~ppc and ~x86 keywords for net-im/amsn
flagedit net-im/amsn -- % # resets the keywords for this package
flagedit -- +~x86 # sets ACCEPT_KEYWORDS to "~x86" in /etc/make.conf
You can mix the flags and keywords :
flagedit net-im/amsn +gnome -- +~x86
PACKAGE is a package name (like dev-ruby/ruby-atk). If no package is given,
flagedit will edit the maine USE flags (in make.conf), or the main
ACCEPT_KEYWORDS (in make.conf)
ACTIONS are :
+FLAG enable the FLAG. Example : +sse
-FLAG disable the FLAG. Example : -sse
%FLAG reset the FLAG to default. Example : %sse
% reset the whole flags of PACKAGE to default. In this case, PACKAGE is not optional
KEYWORD_ACTIONS are :
+KEYWORD enable the keyword. Example : +x86
-KEYWORD disable the KEYWORD. Example : -~x86
%KEYWORD reset the KEYWORD to default. Example : %x86
% reset the whole keywords of PACKAGE to default. In this case, PACKAGE is not optional
OPTIONS are :
--package-file <path> specify an alternate package.use file (default is /etc/portage/package.use)
--keywords-file <path> specify an alternate package.keywords file (default is /etc/portage/package.keywords)
--make-conf-file <path> specify an alternate make.conf file (default is /etc/make.conf)
--portage-dir <path> specify an alternate portage directory path (default is /usr/portage)
--alpha-order sort the flags or keywords alphabetically instead of keeping the original order
--show don't edit, display the flags or keywords of the PACKAGE. If no package is given, display the system USE flags or the system ACCEPT_KEYWORDS.
--list don't edit, display the entire list of possible flags or possible keywords.
--desc if specified with --list, display the flags or keywords description also.
--keywords specifies that actions are to be done on keywords, not on use flags
-- same as --keywords
--strict if a specified flag or keyword name is invalid, dies, instead of just warning.
--nowarn if a specified flag or keyword name is invalid, don't warn.
--help this help
--version prints the version
see http://dkrotkine.com/flagedit/