1 |
On 08/17/2011 12:16 AM, Michał Górny wrote: |
2 |
> On Tue, 16 Aug 2011 01:51:27 -0700 |
3 |
> Zac Medico <zmedico@g.o> wrote: |
4 |
> |
5 |
>> On 08/16/2011 01:29 AM, Michał Górny wrote: |
6 |
>>> On Tue, 16 Aug 2011 01:10:48 -0700 |
7 |
>>> Zac Medico <zmedico@g.o> wrote: |
8 |
>>> |
9 |
>>>> On 08/16/2011 12:40 AM, Michał Górny wrote: |
10 |
>>>>> On Tue, 16 Aug 2011 00:26:41 -0700 |
11 |
>>>>> Zac Medico <zmedico@g.o> wrote: |
12 |
>>>>>> On 08/16/2011 12:01 AM, Micha? Górny wrote: |
13 |
>>>>>>>>> Considering the number of different virtuals in this |
14 |
>>>>>>>>> category, maybe it would be a good idea to split it a little? |
15 |
>>>>>>>>> What I'm proposing is maybe creating some kind of '*-virtual' |
16 |
>>>>>>>>> categories. |
17 |
>>>>>>>>> |
18 |
>>>>>>>>> For example, half of the current virtuals are prefixed with |
19 |
>>>>>>>>> 'perl-'. Maybe they could be transformed into |
20 |
>>>>>>>>> 'perl-virtual/*'? |
21 |
>>>>>>>> |
22 |
>>>>>>>> If you're going to do that, then I'd suggest giving them some |
23 |
>>>>>>>> sort of tag that the package manager can rely upon in order to |
24 |
>>>>>>>> identify them as virtuals. For example, we could have the |
25 |
>>>>>>>> ebuilds set PROPERTIES=virtual [2], or we could simply specify |
26 |
>>>>>>>> (in PMS) that any category whose name matches the '*-virtual' |
27 |
>>>>>>>> pattern will contain virtuals. |
28 |
>>>>>>> |
29 |
>>>>>>> Doesn't DEFINED_PHASES==- serve that purpose nowadays? |
30 |
>>>>> |
31 |
>>>>>> Actually, since EAPI 4 we have default src_install, so it's |
32 |
>>>>>> possible to have ebuilds that have no defined phases but still |
33 |
>>>>>> install stuff. |
34 |
>>>>> |
35 |
>>>>> + empty SRC_URI? I guess something like the workdir fallback |
36 |
>>>>> conditions in PMS. |
37 |
>>>> |
38 |
>>>> When you consider that "live" ebuilds can have empty SRC_URI and |
39 |
>>>> download things during src_unpack, it seems more sensible and |
40 |
>>>> simple to introduce PROPERTIES="live" or something like it. That |
41 |
>>>> way, we'll have a simple boolean flag and won't have to make any |
42 |
>>>> fragile assumptions. |
43 |
>>> |
44 |
>>> Live ebuild have to redefine src_unpack() which makes |
45 |
>>> DEFINED_PHASES!=-. |
46 |
>> |
47 |
>> Sure, but the fact that you have to check two variables like that and |
48 |
>> make these fragile assumptions makes it seem like we're building a |
49 |
>> fragile kludge rather than something that's really practical. |
50 |
> |
51 |
> And isn't a random PROPERTIES value more fragile? |
52 |
|
53 |
Well, if we could have simply relied upon a single variable like |
54 |
DEFINED_PHASES, then that approach would have been preferable. But since |
55 |
it would require making fragile assumptions about DEFINED_PHASES and |
56 |
SRC_URI variables, I think PROPERTIES would be a much more practical |
57 |
approach. |
58 |
|
59 |
> If someone uses it |
60 |
> incorrectly, the results are undefined. |
61 |
|
62 |
I don't think it's a difficult concept to grasp, so I think it's |
63 |
unlikely to be used incorrectly. Even if it is used incorrectly, I don't |
64 |
see it causing major problems. |
65 |
|
66 |
> With older PMs, results are |
67 |
> undefined. |
68 |
|
69 |
The worst case is that some redundant packages are pulled into the |
70 |
dependency graph, which is the legacy behavior anyway, so there's no net |
71 |
loss. |
72 |
|
73 |
> While having empty SRC_URI and no DEFINED_PHASES guarantees that |
74 |
> the ebuild won't install a file. That's just per-def, nothing can |
75 |
> happen. |
76 |
|
77 |
As Ulrich has already mentioned, virtual/ruby-* define phases, so your |
78 |
fragile assumptions are falling apart again. |
79 |
|
80 |
> And still I think implementing stuff like that is just an ugly hack |
81 |
> instead of fixing the real issue. |
82 |
|
83 |
Is the real issue that ebuild developers aren't using workarounds in |
84 |
order to overcome the shortcomings of some dependency resolvers? Really? |
85 |
-- |
86 |
Thanks, |
87 |
Zac |