Gentoo Archives: gentoo-portage-dev

From: Sebastian Luther <SebastianLuther@×××.de>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [RFC] Store [,R,P]DEPEND with unevaluated use conditionals in vdb
Date: Sat, 24 Apr 2010 18:02:28
Message-Id: 4BD331C4.5030002@gmx.de
In Reply to: Re: [gentoo-portage-dev] [RFC] Store [,R,P]DEPEND with unevaluated use conditionals in vdb by Gentoo
1 Am 24.04.2010 13:32, schrieb Gentoo:
2 > On Fri, 2010-04-23 at 22:31 -0700, Zac Medico wrote:
3 >> On 04/23/2010 05:43 AM, Sebastian Luther wrote:
4 >>> Someone might come up with some logic to detect new use flags in
5 >>> *DEPEND, but this looks like a hack to me.
6 >>
7 >> It doesn't seem too bad to me.
8
9 It doesn't work, because it's not guaranteed, that only use flag from
10 IUSE are used in use conditionals. That means you can't do it reliably
11 without the unevaluated value.
12
13 >>
14 >>> The clean solution is to
15 >>> store the unevaluated string.
16 >>
17 >> Do you want to do this for $PKGDIR/Packages as well? We've always
18 >> evaluated USE conditionals in there since we were copying the
19 >> behavior of the older genpkgindex tool and that's how it behaved.
20 >>
21
22 We should do it there too for the same reason as for storing it in the
23 vdb. Never heard of that tool, but anyone handling portage's binpkgs
24 should use the portage api which provides an easy way to evaluate the
25 use conditionals.
26
27 >> Also note that if we want to rely on having unevaluated strings then
28 >> we'll probably want to try to get alternative package managers to
29 >> behave the same way (maybe specify it in PMS).
30
31 The vdb isn't covered by PMS. Paludis stores the unevaluated value,
32 pkgcore stores the evaluated value.
33
34 >>
35 >>> Question is: Does anyone have a good argument to not use the old
36 >>> behavior again?
37 >
38 > space and ease of parsing for minimal pkg mergers.
39 >
40 >
41
42 Minimal mergers have to handle it anyway, since this has been the old
43 behavior until some weeks ago. For portage API users, the difference is
44 a (rather long) one liner. What do you mean with space?
45
46 >>>
47 >>> Sebastian
48 >>>
49 >>> [1] commit e6be6590e99522f9be69e2af8eff87919d9bf31f on 2010-02-14
50 >>
51 >> I think we'll have to handle the evaluated strings anyway since this
52 >> code has already been released and stabilized in portage-2.1.8.x,
53 >> and USE conditionals have been evaluate in $PKGDIR/Packages for even
54 >> longer. Because of this, I see little or no benefit in changing it
55 >> back to unevaluated strings at this point.
56 >
57 > Good. Thanks for not reverting back to those old behaviors.
58
59 And the new use case isn't of any relevance?
60
61 As a compromise: What about storing both values?

Replies