1 |
On 04/24/2010 11:00 AM, Sebastian Luther wrote: |
2 |
> Am 24.04.2010 13:32, schrieb Gentoo: |
3 |
>> On Fri, 2010-04-23 at 22:31 -0700, Zac Medico wrote: |
4 |
>>> On 04/23/2010 05:43 AM, Sebastian Luther wrote: |
5 |
>>>> Someone might come up with some logic to detect new use flags in |
6 |
>>>> *DEPEND, but this looks like a hack to me. |
7 |
>>> |
8 |
>>> It doesn't seem too bad to me. |
9 |
> |
10 |
> It doesn't work, because it's not guaranteed, that only use flag from |
11 |
> IUSE are used in use conditionals. That means you can't do it reliably |
12 |
> without the unevaluated value. |
13 |
|
14 |
We can and should add a check to repoman to enforce this. It's long |
15 |
overdue. The flags already cannot be enabled unless they are in |
16 |
IUSE, since portage filters them (except for special things like |
17 |
use.force). |
18 |
|
19 |
>>> |
20 |
>>>> The clean solution is to |
21 |
>>>> store the unevaluated string. |
22 |
>>> |
23 |
>>> Do you want to do this for $PKGDIR/Packages as well? We've always |
24 |
>>> evaluated USE conditionals in there since we were copying the |
25 |
>>> behavior of the older genpkgindex tool and that's how it behaved. |
26 |
>>> |
27 |
> |
28 |
> We should do it there too for the same reason as for storing it in the |
29 |
> vdb. Never heard of that tool, but anyone handling portage's binpkgs |
30 |
> should use the portage api which provides an easy way to evaluate the |
31 |
> use conditionals. |
32 |
> |
33 |
>>> Also note that if we want to rely on having unevaluated strings then |
34 |
>>> we'll probably want to try to get alternative package managers to |
35 |
>>> behave the same way (maybe specify it in PMS). |
36 |
> |
37 |
> The vdb isn't covered by PMS. Paludis stores the unevaluated value, |
38 |
> pkgcore stores the evaluated value. |
39 |
> |
40 |
>>> |
41 |
>>>> Question is: Does anyone have a good argument to not use the old |
42 |
>>>> behavior again? |
43 |
>> |
44 |
>> space and ease of parsing for minimal pkg mergers. |
45 |
>> |
46 |
>> |
47 |
> |
48 |
> Minimal mergers have to handle it anyway, since this has been the old |
49 |
> behavior until some weeks ago. For portage API users, the difference is |
50 |
> a (rather long) one liner. What do you mean with space? |
51 |
|
52 |
He's talking about qmerge from portage-utils. It's a C program |
53 |
that's intended to merge binary packages on an embedded device that |
54 |
doesn't necessarily have python installed. |
55 |
|
56 |
>>>> |
57 |
>>>> Sebastian |
58 |
>>>> |
59 |
>>>> [1] commit e6be6590e99522f9be69e2af8eff87919d9bf31f on 2010-02-14 |
60 |
>>> |
61 |
>>> I think we'll have to handle the evaluated strings anyway since this |
62 |
>>> code has already been released and stabilized in portage-2.1.8.x, |
63 |
>>> and USE conditionals have been evaluate in $PKGDIR/Packages for even |
64 |
>>> longer. Because of this, I see little or no benefit in changing it |
65 |
>>> back to unevaluated strings at this point. |
66 |
>> |
67 |
>> Good. Thanks for not reverting back to those old behaviors. |
68 |
> |
69 |
> And the new use case isn't of any relevance? |
70 |
|
71 |
> As a compromise: What about storing both values? |
72 |
|
73 |
That's feasible, but I still think that comparison of evaluated deps |
74 |
is going to work just fine (and be backward compatible with all |
75 |
package managers), so storing that additional values seems |
76 |
redundant. If unevaluated deps are missing (due to alternative |
77 |
package managers or older portage), it seems like you'll need to |
78 |
fall back to evaluated comparison anyway. |
79 |
-- |
80 |
Thanks, |
81 |
Zac |