Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-dev
On Thursday 11 November 2004 09:34, Mike Frysinger wrote:
> On Wednesday 10 November 2004 07:28 pm, Thomas de Grenier de Latour wrote:
> > Just by curiosity, what should be the behavior of a Portage
> > implementing USE dependencies? Failure at depend time? Forcing
> > a re-emerge of packages with missing flags? Something else?
>
> hasnt been decided ...
> i think either forcing a rebuild of the package or failing and telling the
> user what they need to do would be good
I was going with rebuilding the package with the required USE flags. Two
reasons:
1) Something Mr_Bones_ said - "Emerge should do the least amount of work
necessary to fulfill a user's request". That seems like a logical statement
to me. I also interpret that portage should do it if it can as well. I'll go
into the semantics of what this means in a minute.
2) If we don't do it within portage, there'll be 101 faulty implementations to
do it automagically in various clients when portage is given a public API.
Regardless of whether it is our "fault" or not, we'll get the "blame".
So.. semantics. Example time. :)
#1
foo:DEPEND="baz[use]"
baz is installed with -use
"emerge foo" results in:
baz[use]
foo
#2
foo:DEPEND=""
foo:REPEND="baz[use]"
bar:DEPEND="baz[-use]"
bar:RDEPEND=""
baz is installed with -use
"emerge foo bar" or "emerge bar foo" results in:
foo and baz[-use] in parallel/any order
bar
#3
Make DEPENDs into RDEPENDs and vice-versa in the above and..
"emerge foo bar" or "emerge bar foo" results in:
baz[use]
foo and baz[-use] in parallel/any order
bar
#4
foo:DEPEND="baz[use]"
foo:RDEPEND=""
bar:DEPEND="baz[-use]"
bar:RDEPEND=""
baz is installed with -use
"emerge foo bar" or "emerge bar foo" results in:
bar
baz[use]
foo
#5
foo:RDEPEND="baz[use]"
bar:RDEPEND="baz[-use]"
"emerge foo bar" or "emerge bar foo" results in:
NOPE!!!
#6
foo:DEPEND="use? bar[use]"
bar:DEPEND="use? foo[use]"
"emerge foo bar" or "emerge bar foo" results in:
bar
foo[use]
bar[use]
--or--
foo
bar[use]
foo[use]
That last case is interesting. Will probably end up using source size as a
rough estimate of time to complete in order to determine which package comes
first. Playing with more than two or three packages gets interesting too...
Anyway, I'm sure most people don't care about this as long as it Just Works,
so I'll leave the reasoning for going ahead with the merge at that.
Regards,
Jason Stubbs
--
gentoo-dev@g.o mailing list
|
|