First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 61732
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: SpanKY <vapier@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
emerge-IUSE.patch prelimenary patch patch Alec Warner 2006-01-02 13:09 0000 2.75 KB Details | Diff
IUSE-test-1.0.ebuild A crappy ebuild to test with. application/octet-stream Alec Warner 2006-01-02 13:14 0000 703 bytes Details
IUSE-DEFAULTS-v0.1.patch New "real" patch patch Alec Warner 2006-02-13 09:35 0000 6.65 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 61732 depends on: Show dependency tree
Bug 61732 blocks: 147007 174410
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-08-25 23:20 0000
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

------- Comment #1 From Brian Harring 2004-08-27 13:02:34 0000 -------
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).

------- Comment #2 From Nicholas Jones (RETIRED) 2004-10-09 19:34:43 0000 -------
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"


------- Comment #3 From SpanKY 2004-10-09 19:41:03 0000 -------
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

------- Comment #4 From Stefan Schweizer 2005-01-16 04:03:08 0000 -------
This is also valid for beep-media-player, where a IUSE=+mp3 is needed.

------- Comment #5 From Michiel de Bruijne 2005-02-08 04:16:57 0000 -------
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?

------- Comment #6 From Martin Schlemmer (RETIRED) 2005-02-09 05:36:19 0000 -------
> (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.

------- Comment #7 From Nicholas Jones (RETIRED) 2005-03-06 15:55:09 0000 -------
The better way to handle this is probably via use requirements
in the depend strings.

------- Comment #8 From Jason Stubbs (RETIRED) 2005-07-28 07:25:36 0000 -------
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. ;) 

------- Comment #9 From Petteri Räty 2005-10-20 15:05:07 0000 -------
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.

------- Comment #10 From Alec Warner 2006-01-02 13:08:34 0000 -------
Working on this.

------- Comment #11 From Alec Warner 2006-01-02 13:09:53 0000 -------
Created an attachment (id=76018) [details]
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...

------- Comment #12 From Alec Warner 2006-01-02 13:14:06 0000 -------
Created an attachment (id=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.

------- Comment #13 From Alec Warner 2006-02-13 09:35:26 0000 -------
Created an attachment (id=79707) [details]
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.

------- Comment #14 From solar 2006-08-09 05:02:13 0000 -------
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.

------- Comment #15 From Zac Medico 2006-10-12 10:37:56 0000 -------
(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.

------- Comment #16 From Zac Medico 2006-10-13 21:23:38 0000 -------
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.

------- Comment #17 From Zac Medico 2006-10-14 00:54:58 0000 -------
This has been released in 2.1.2_pre3.

------- Comment #18 From Zac Medico 2007-04-13 22:03:45 0000 -------
(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.

------- Comment #19 From Zac Medico 2007-11-10 21:43:32 0000 -------
(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`).

------- Comment #20 From David Watzke 2008-01-27 23:04:49 0000 -------
(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?

------- Comment #21 From Zac Medico 2008-01-28 00:31:18 0000 -------
(In reply to comment #20)
See explanation in bug 204196 comment #1.

First Last Prev Next    No search results available      Search page      Enter new bug