Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2900 - Created script to help users manage USE flags.
Summary: Created script to help users manage USE flags.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Karl Trygve Kalleberg (RETIRED)
Depends on:
Reported: 2002-05-21 20:23 UTC by Michael Thompson
Modified: 2002-06-24 19:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

useflag (useflag,13.76 KB, text/plain)
2002-05-21 20:24 UTC, Michael Thompson
useflag v0.3.0 - 15254 bytes (useflag,14.90 KB, text/plain)
2002-06-09 11:59 UTC, Michael Thompson
useflag.1 - man page (useflag.1,5.34 KB, text/plain)
2002-06-09 12:00 UTC, Michael Thompson

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Thompson 2002-05-21 20:23:04 UTC
This bash script is designed to help users manage their USE flags.  It has been
updated to reflect the suggestions of George Shapovalov on gentoo-dev ML.


useflag help
Prints the manual for this utility.

useflag show
Prints the contents of your USE variable.

useflag desc [flag] ...
Prints descriptions of USE flags.

useflag add [[-]flag] ...
Adds the specified flag(s) to your USE variable.

useflag del [[-]flag] ...
Removes the specified flag(s) from your USE variable.

useflag update
Updates your USE variable based on the latest changes to use.desc

Fuller description of the "update" function:
useflag update
This will interactively update your USE variable as defined in
make.conf to reflect changes in use.desc.  First, it will check
for depreciated USE flags by searching your USE variable for
flags that no longer appear in use.desc.  You will then be
presented with several options for handling these flags.  Next,
use.desc will be searched for new flags that have become
available.  The first time you run it, you will be presented
with several options for handling all flags that are not in your
USE variable.  This can be useful when creating a USE variable
from scratch on a new machine.  From then on, you will only be
prompted when new flags appear in use.desc.

Let me know if changes need to be made.  It's been tested and doesn't have any
known bugs.  Naturally you should back up your make.conf before using it anyway.
Comment 1 Michael Thompson 2002-05-21 20:24:14 UTC
Created attachment 1089 [details]
Comment 2 Grant Goodyear (RETIRED) gentoo-dev 2002-05-22 16:10:43 UTC
We would like to put in in gentoolkit, but we need a manpage first.

Comment 3 George Shapovalov (RETIRED) gentoo-dev 2002-05-22 17:06:38 UTC
Hi Michael

Good work!
I spoke with gentoolkit maintainer, his requirement is that the tool should have
an appropriate man page. 
Also I noticed that "useflag help" outputs quite lengthy text. I think you could
put all that into man page (but please format it accordingly!) and make the tool
output somewhat shorter text insetad (like what it does now when invoked without

Comment 4 Michael Thompson 2002-06-09 11:57:31 UTC
Nice to see it wasn't universally trashed. ^_^  I apologize for the delay.  Real
life has gotten the better of me for a couple of weeks.

I'm attaching a new version that I did a couple of days after the first
submission.  It fixes some minor bugs, has better error handling, and adds a
locking feature to prevent the user from being repeatedly queried about
depreciated flags that he/she wants to keep.

I'm also attaching the man page you requested.

Let me know if you need any changes made.  I can get to them more quickly now. :-P
Comment 5 Michael Thompson 2002-06-09 11:59:11 UTC
Created attachment 1415 [details]
useflag v0.3.0 - 15254 bytes
Comment 6 Michael Thompson 2002-06-09 12:00:07 UTC
Created attachment 1416 [details]
useflag.1 - man page
Comment 7 George Shapovalov (RETIRED) gentoo-dev 2002-06-09 15:29:12 UTC
Looks like it is ready for "prime time" now :)
reassigning to karltk (maintainer of the gentoolkit).

Comment 8 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-06-24 18:01:37 UTC
It's a neat little tool. I have added it. There are a few minor points, though.

With the new use flag system, you will have to calculate the "net" use flags
based on /etc/make.conf ang /etc/make.profile/make.defaults

Also, should it not be "deprecation" (to express disapproval of) instead of
"depreciation" (to lower in estimation or esteem) ?

Comment 9 Michael Thompson 2002-06-24 19:53:56 UTC
Thank you.

Will work on adding the ability to calculate and use/display the net USE value,
based on all four USE modifiers (make.defaults, use.defaults, make.conf, and the

I've seen both widely used, but if you feel that "deprecation" is more correct,
I will modify it accordingly.

Thanks everyone for the input.