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. Usage: 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.
Created attachment 1089 [details] useflag
We would like to put in in gentoolkit, but we need a manpage first. Thanks!
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 action). Thanks! George
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
Created attachment 1415 [details] useflag v0.3.0 - 15254 bytes
Created attachment 1416 [details] useflag.1 - man page
Looks like it is ready for "prime time" now :) reassigning to karltk (maintainer of the gentoolkit). George
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) ?
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 environment). 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.