see noted thread for more info but basically here is the problem: - we have global and local USE flags - default global USE settings can be specified via make.defaults - per profile and keeping settings across profiles is a pita for maintainers - nothing exists to specify default local USE settings - maintainers usually know best what a good sane 'default' USE setting is here is the proposed solution: (short term first stage) updated IUSE syntax which will allow for setting default flags ... this is on a per-package and per-version basis since each ebuild can set IUSE differently ... also note that this can be done for both global and local USE flags; if it's in $IUSE it's fair game for example, nano-1.3.4: IUSE="nls build +spell +justify debug slang ncurses +mac" if a user's USE did not have 'justify' specified either as 'justify' or '-justify', then portage would auto add 'justify' to USE for nano-1.3.4 ... basically portage considers $IUSE as the last item in the env ordering system (long term second stage) some people suggested we could also support '-' in IUSE with this system. for example, if make.defaults has USE="sdl", but the ebuild has IUSE="-sdl", and the user has nothing to say one way or the other for sdl, then sdl would be turned off for that package
I like it, although nobody has thrown out ideas for backwards compatibility (aside from that ebuild dep'ing on a version of portage that has the support, which works).
This includes a very large bit of complexity. Now we have to determine the profile's "intent" and the "intent" of the user's selections in their config and judge them against the maintainer's "intent". I think it's neat and glittery, but highly confusing. As a small excercise, please identify the course of action for the following: (Final applied USE, and what USE is saved in the DB) Default: USE="a b c" Auto: USE="a" User: USE="-a b d" IUSE="+a -b -c -d +e" Default: USE="a b c" Auto: USE="e" User: USE="-a b d" IUSE="-a -b -c -d -e" Default: USE="a b c" Auto: USE="e" User: USE="-* f" IUSE="+a +b +c +d +e" Default: USE="a b c" Auto: USE="e" User: USE="-*" IUSE="+a +b -c +d +e"
the solution here is basically increment the settings: use.defaults ebuild's IUSE make.defaults user i dont see how this is confusing ... basically you're taking make.defaults and complementing it with the ebuild's IUSE you record into the database whatever is applied to the ebuild when you emerge it
This is also valid for beep-media-player, where a IUSE=+mp3 is needed.
Hi Nicholas, Could you please explain why/where you see a very large bit of complexity, I don't see it either, just evaluate in the following order; use.defaults ebuild's IUSE make.defaults make.conf package.use use.mask if not set in previous then disabled About the backwards compatibility; why not make it a policy that if you want to use a tree at x point in time you need the stable version of portage available in x point in time?
> (long term second stage) > some people suggested we could also support '-' in IUSE with this system. for > example, if make.defaults has USE="sdl", but the ebuild has IUSE="-sdl", and the > user has nothing to say one way or the other for sdl, then sdl would be turned > off for that package Just need to make sure devs ONLY use this when the feature is broken or cause issues, and not when they do not like it/whatever.
The better way to handle this is probably via use requirements in the depend strings.
Putting a hold on feature requests for portage as they are drowning out the bugs. Most of these features should be available in the next major version of portage. But for the time being, they are just drowning out the major bugs and delaying the next version's progress. Any bugs that contain patches and any bugs for etc-update or dispatch-conf can be reopened. Sorry, I'm just not good enough with bugzilla. ;)
One way to make this work in a backwards compatible way is to just add ${PORTDIR}/profiles/package.use. Then we could move to using the new syntax when the new EAPI stuff is implemented.
Working on this.
Created attachment 76018 [details, diff] prelimenary patch This is just a proof of concept and learning tool, also sent to the ML. Hoping for more input, need to review the archives above...
Created attachment 76019 [details] A crappy ebuild to test with. Here is the ebuild I used for testing. No it doesn't pass QA, no I don't care.
Created attachment 79707 [details, diff] New "real" patch Ok, this one needs testing, but is how it will probably get implemented. IUSE_DEFAULTS instead of IUSE for backwards compatability. USE_ORDER="env:pkg:conf:iuse_defaults:auto:defaults" I'll upload a test ebuild later, but basically you ehh put things in IUSE_DEFAULTS in an ebuild, such as IUSE_DEFAULTS="-cxx" This shouldl apply to 2.1_pre4 and trunk. You need to either add iuse_defaults to USE_ORDER in make.conf or just set USE_ORDER="" make.conf to get the proper defaults.
I'm in favor of this basic support being added to portage. This would round out portage in a nice way now that USE_ORDER w/ auto was deprecated.
(In reply to comment #9) > One way to make this work in a backwards compatible way is to just add > ${PORTDIR}/profiles/package.use. Then we could move to using the new syntax when > the new EAPI stuff is implemented. I'm working on a patch that does both. The patch adds 2 more layers to the USE_ORDER stack: pkginternal and pkgprofile. The pkginternal is for +flag inside IUSE and pkgprofile is for package.use inside profiles. USE_ORDER = "env:pkg:conf:pkgprofile:defaults:pkginternal" The intention is that the IUSE defaults is for flags that should be enabled regardless of profile. Then, package.use is available for flags that might vary depending on the profile. For example, a server profile might enable server flags and a desktop profile might enable client flags.
Most people have responded favorable to the idea of IUSE defaults and profile package.use, so I've gone ahead and put support for both in svn r4679. Since people shouldn't use these immediately in the main tree, we can always revert one or both sometime in the near future if we need to.
This has been released in 2.1.2_pre3.
(In reply to comment #0) > (long term second stage) > some people suggested we could also support '-' in IUSE with this system. for example, if make.defaults has USE="sdl", but the ebuild has IUSE="-sdl", and the user has nothing to say one way or the other for sdl, then sdl would be turned off for that package The current implementation does not support -flag in IUSE. One reason is the stacking order, USE_ORDER="env:pkg:conf:defaults:pkginternal", where pkginternal represents flags from IUSE. Since pkginternal comes at the beginning of the stack, there are no flags for it to negate.
(In reply to comment #18) > The current implementation does not support -flag in IUSE. In versions of portage that support EAPI 1, -flag is supported, but it's usually not very useful due to the default USE_ORDER setting (see `man make.conf`).
(In reply to comment #19) > In versions of portage that support EAPI 1, -flag is supported, but it's > usually not very useful due to the default USE_ORDER setting (see `man > make.conf`). Let me get this straight. It doesn't do what vapier suggested in comment #0; it only affects something if an environment variable USE has been set through /etc/env.d/. Am I right?
(In reply to comment #20) See explanation in bug 204196 comment #1.