The summary says it all. It would be helpful if showing, enabling and disabling per-package USE flags with euse would be possible. Of course 'euse -i USEFLAG' should show if USEFLAG is enabled globally or per-package as well. :) Reproducible: Always Steps to Reproduce:
See Bug 3252
Actually, I mean see Bug 13616. Basically, this per-package USE flags can already be done in /etc/portage/package.use, with lines formatted such as: net-mail/evolution -mozilla Nifty!
This bug is about euse supporting per-package useflags. I know they exist and are supported by portage (I use them). But euse (part of gentoolkit) does not support them yet. That is why I created this bug.
Ah, this is a request to show what packages use the flag... ufed should be able to edit per package useflags too... We know that per package suppored useflags are supported by: ************ /etc/portage/package.use or something like that.... but... I don't really know.... my /etc/portage/package.use contains: =kde-base/kdewebdev-3.3.0_beta1 debug dev-libs/cyrus-sasl gdbm -berkdb http://bugs.gentoo.org/show_bug.cgi?id=41658 is related, because we need to let people know about useflags.
As I'd like to see this too, I'll try: The request is to make euse (the tool) add/remove flags from /etc/portage/package.use if the flags are listed in /usr/portage/profiles/use.local.desc instead of adding/removing them from /etc/make.conf I'd suggest to make this behaviour optional.
Why only for useflags from /usr/portage/profiles/use.local.desc? Suppose I want to: euse -E gtk (enable gtk useflag globally) and then euse -D gtk net-p2p/mldonkey (disable gtk useflag for mldonkey in /etc/portage/package.use)
Created attachment 57090 [details] The new USE flags handler I wrote a script to handle global AND local use flags. It's called eusepy, because it's like euse, but written in Python :) I posted it at gentoo-submissions@gentoo.org more than a month ago, but I never had an anwser. It can enable/disable/clean USE flags in /etc/portage/package.use as well as in /etc/make.conf. Some examples of how to use it : Enable a global flag: # eusepy -e kde => kde (a global flag) is added to USE="..." in /etc/make.conf Enable a local flag: # eusepy -e sse2 => sse2 (a local flag) is added in /etc/portage/package.use for ALL packages who have it (currently mplayer, fftw and transcode). If you want sse2 only for mplayer, you can run: # eusepy -e mplayer:sse2 and sse2 will be set ONLY for mplayer in package.use Enable a global flag only for 1 package: # eusepy -e eclipse-sdk:kde => kde is added to /etc/portage/package.use for dev-util/eclipse-sdk only. Disable an use flag: # eusepy -d sse2 sse2 is disabled for ALL packages who have it on /etc/portage/package.use # eusepy -d kde kde is disabled in make.conf Enable several use flags at once: # eusepy -e kde sse2 mplayer:avi Clean a use flag: # eusepy -c kde see eusepy -h for the manual :) the files affected are /etc/make.conf and /etc/portage/package.use eusepy make .bak file backups. Use at your own risk =) It does not support the euse ability to show in where files each USE flag is enabled. And please forgive my low English language skill, as it isn't my natural language.
"I posted it at gentoo-submissions@gentoo.org more than a month ago, but I never had an anwser." I'm pretty sure that alias is dead and buried for a very long time by now. Don't think I'll replace the current euse with your script, but rather only reimplement this new feature in it (whenever I get some time and motivation).
*** Bug 126404 has been marked as a duplicate of this bug. ***
Created attachment 84578 [details] Another crack at euse in python I also took a crack at this in python before checking for bugs and realizing this was already here. It adds the functionality to enable/disable per package support in package.use using a new -k, --package <pkg> argument. I also added flags for -i/-a for use.defaults and auto-use flags enabled based on packages installed. There's still the problem with cascading profiles and overlays. This is my first attempt at working with portage, so I'd consider this a first step if it gets used. Sorry if you've already got this implemented in bash.
*** Bug 174049 has been marked as a duplicate of this bug. ***
Created attachment 167475 [details, diff] a simple patch to to the existing euse to support per-package use flags Here is a small patch that adds the requires functionality to the existing euse shell script. Applies cleanly against gentoolkit from portage and SVN trunk. It works like this: Any command line argument that looks like a package specifier (sys-devel/gcc or \>=gcc-4) switches euse in package.use mode. As a convenience, short package names may be prefixed by a slash to disambiguate them from a use flag (e.g., /gcc). Short package names will be resolved to their full name. All packages specified will have the requested use flag changes made in a clean fashion: - lines in package.use not matching the package(s) will not be modified - order is preserved - duplicate entries for one of the selected packages will be consolidated into one entry - if an entry has no use flags left (by using -P), the entry will be removed Examples: Disable the gcj and gtk flags for all versions of gcc: euse -D /gcc gcj gtk Disable nls and X for some packages (no matter that some don't have X in their IUSE): euse -D /coreutils /util-linux /groff nls X Make a gcc 3 installation rather minimal, since no one but qemu needs it anymore: euse -D \<gcc-4
(In reply to comment #12) This is an interesting patch and a good idea. Unfortunately it doesn't take into account the fact that package.use can be a directory containing an arbitrary number of files, so it would need a bit more logic to handle that. Read the "/etc/portage" section in man portage. Also I think this: > euse -D /coreutils /util-linux /groff nls X is a bit hacky looking, personally. I think a better solution would be a -p, --packages option that takes a comma-separated list or package names, something like: euse -D X # disable flag X globally euse -p coreutils,util-linux,groff -D X # disable X for only certain packages If you need this functionality now, flagedit supports it.
I've done a lot of work for per-package use flags under bug #259318
Can you verify this is implemented in gentoolkit-0.3.0?
This should be fixed in gentoolkit-0.3.0.4, if it isn't please reopen or file a new bug.