Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7484 - Ebuild and util for decide, enable and disable Gentoo USE-flags
Summary: Ebuild and util for decide, enable and disable Gentoo USE-flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Nicholas Jones (RETIRED)
URL: http://www.interhost.no/opensource/gs...
Whiteboard:
Keywords:
: 7266 (view as bug list)
Depends on:
Blocks: 7266
  Show dependency tree
 
Reported: 2002-09-04 17:05 UTC by Christian Skarby
Modified: 2003-07-18 15:18 UTC (History)
5 users (show)

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


Attachments
gentoo-setuse.ebuild.tar.bz2 (gentoo-setuse.ebuild.tar.bz2,1.19 KB, application/bzip2)
2002-09-04 17:07 UTC, Christian Skarby
Details
gsetuse-0.2.tar.bz2 (gsetuse-0.2.tar.bz2,9.19 KB, application/octet-stream)
2002-10-09 15:35 UTC, Christian Skarby
Details
gsetuse-ebuild.tar.bz2 (gsetuse-ebuild.tar.bz2,1.77 KB, application/octet-stream)
2002-10-09 16:04 UTC, Christian Skarby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Skarby 2002-09-04 17:05:14 UTC
Situation: Every time I set up a Gentoo system I like to go through and consider each USE-flag. 
Lately I've been doing it a lot :) but because there is a lot of USE-flags I do not remember every 
single in detail. The result is that I do have to keep 3 windows open switching between 
/usr/portage/profiles/use.desc, /etc/make.profile/make.defaults and /etc/make.conf. It 
is not always so easy to keep track of where I am in each window at every moment, at least that is my 
experience.

Suggested solution: a simple script can parse the files, find which use-flags 
that is Valid, which use-flags that are in your Profile and which that are Enable. Furthermore the 
script can print the current state of the USE-flag (with respect to 
/etc/make.profile/make.defaults and /etc/make.conf) the USE-flag-desription and an option 
(Enable or Disable) the USE-flag.
f.ex. 
<snip>
[ VPE ] x86 - indicates that architecture is 
x86
        Disable or Enable [E]: _
</snip>
This indicates that x86 is a valid USE-flag (with 
respect to use.desc) and is in your profile and currently enabled.

Possible pitfalls: 1) 
There are some flags one should not set/unset oneself, i.e. at least bootstrap, build, x86, ppc, 
sparc, sparc64 unless you for certain indeed know what you are doing. 2) There might be something 
that I've overlooked, but as far as I remember are USE-flags set by first parsing make.defaults, 
then taking USE=... from make.conf (and then USE=... from the environment when running emerge 
mypackage.) 3) In the future there might be changes in how all this is glued together, but that I 
cannot take in consideration.

Most vise would probably been to write this in pyton, but as I 
needed it quick and have not touched any python code yet, I wrote an implementation using perl. I 
believe that it would be better to have this in python (portage-native) and maybe even as a part of 
portage(?) - what is your opinion about that?

Happy gsetuse (Gentoo SET USE-flags)!

and .. 
well .. I sugest this package goes to app-admin/gsetuse 


All the best,

Christian
Comment 1 Christian Skarby 2002-09-04 17:07:19 UTC
Created attachment 3656 [details]
gentoo-setuse.ebuild.tar.bz2
Comment 2 Christian Skarby 2002-10-09 15:35:19 UTC
Created attachment 4545 [details]
gsetuse-0.2.tar.bz2
Comment 3 Christian Skarby 2002-10-09 15:43:47 UTC
Talked with blizzy on #gentoo-dev today.
Seemed like it were interest in a dialog-box for this script and I think it is a
good ide
Comment 4 Christian Skarby 2002-10-09 15:43:47 UTC
Talked with blizzy on #gentoo-dev today.
Seemed like it were interest in a dialog-box for this script and I think it is a
good ideá. Blizzy had already made http://www.gentoo.org/~blizzy/use.sh - which
require dev-util/dialog merged. I stole a lot from him for my last attachment
4545 [details] now i do not anylonger prompt the user for flags containing internal nor
flags containing ( indicates and arcitechture ) 

In order to use gsetuse-0.2 (attachment 4545 [details]) one needs 
 dev-util/dialog
 dev-perl/TermReadKey
merged .. I'll provide you with a revided ebuild soon

Christian
Comment 5 Christian Skarby 2002-10-09 16:04:39 UTC
Created attachment 4551 [details]
gsetuse-ebuild.tar.bz2

This tar-package includes ebuilds both for gsetuse-0.1 and gsetuse-0.2
Comment 6 Christian Skarby 2002-10-09 16:08:07 UTC
ad comment #3, a little specification

when talking about "flags containing" I here thought about the part of the line
in use.desc that follows the actual use-flag.

Regards,
Christian
Comment 7 SpanKY gentoo-dev 2003-01-08 13:19:12 UTC
*** Bug 7266 has been marked as a duplicate of this bug. ***
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2003-05-07 11:11:24 UTC
Don't you think you could close this? ufed is out for quite some time...
Comment 9 SpanKY gentoo-dev 2003-07-18 15:18:04 UTC
solution: `emerge ufed`