1 |
On 17 September 2012 18:55, Alex Alexander <alex.alexander@×××××.com> wrote: |
2 |
> On Sep 17, 2012 6:13 AM, "Brian Harring" <ferringb@×××××.com> wrote: |
3 |
>> |
4 |
>> On Sun, Sep 16, 2012 at 07:32:39PM +0300, Alex Alexander wrote: |
5 |
>> > On Sep 16, 2012 4:55 PM, "Brian Harring" <[1]ferringb@×××××.com> |
6 |
>> > wrote: |
7 |
>> > > |
8 |
>> > > Folks- |
9 |
>> > > |
10 |
>> > > Keeping it short and quick, a basic glep has been written for what |
11 |
>> > I'm |
12 |
>> > > proposing for DEPENDENCIES enhancement. |
13 |
>> > > |
14 |
>> > > The live version of the doc is available at |
15 |
>> > > |
16 |
>> > |
17 |
>> > [2]http://dev.gentoo.org/~ferringb/unified-dependencies/extensible_depe |
18 |
>> > ndencies.html |
19 |
>> > |
20 |
>> > Am I the only one who thinks that this dep:{build,...} thing looks |
21 |
>> > really ugly and is hard to read? |
22 |
>> > |
23 |
>> > IMO simply removing the "dep" part would greatly improve things: |
24 |
>> |
25 |
>> That 'dep' part isn't great, but it's added for a reason; to unify |
26 |
>> with USE_EXPAND/use group intended syntax. There's a reference in |
27 |
>> there to |
28 |
>> http://www.gossamer-threads.com/lists/gentoo/dev/260069#260069 which |
29 |
>> I'll formalize soon enough. |
30 |
>> |
31 |
>> |
32 |
>> > DEPENDENCIES=" |
33 |
>> > :build,run? ( ... ) |
34 |
>> > :run? ( ... ) |
35 |
>> > " |
36 |
>> |
37 |
>> For your suggestion, consider it if we *do* fxi USE expand- via using |
38 |
>> the same <namespace>:<setting> form. |
39 |
>> |
40 |
>> Using app-admin/mcollective ad an example, it's deps are thus: |
41 |
>> |
42 |
>> DEPEND="ruby_targets_ruby18? ( dev-lang/ruby:1.8 ) |
43 |
>> ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )" |
44 |
>> RDEPEND="dev-ruby/stomp |
45 |
>> ruby_targets_ruby18? ( dev-lang/ruby:1.8 ) |
46 |
>> ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )" |
47 |
>> |
48 |
>> Which, if USE_EXPAND targets were groupped, would go from this |
49 |
>> ruby_targets_ruby18? ( dev-lang/ruby:1.8 ) |
50 |
>> ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 ) |
51 |
>> dep:run? ( dev-ruby/stomp )" |
52 |
>> |
53 |
>> to this: |
54 |
>> ruby:targets_ruby18? ( dev-lang/ruby:1.8 ) |
55 |
>> ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 ) |
56 |
>> :run? ( dev-ruby/stomp ) |
57 |
> |
58 |
> Ok, now I get it. I've read the other threads as well, but failed to put it |
59 |
> all together. Happens when you barely sleep every night :-) |
60 |
> |
61 |
> I don't like this mix of dependency types and use flag deps. It smells |
62 |
> trouble. Dependency types should be easy to separate and read, but the above |
63 |
> example is a mess, "dep:" or no "dep:". |
64 |
> |
65 |
> Why? Because you have to scan the whole thing to sort out which lines are |
66 |
> dependency types and which lines are use deps and even then it would be easy |
67 |
> to misread something. |
68 |
> |
69 |
> If we want to stay away from labels (which aren't that bad IMO), I'd |
70 |
> recommend the following instead: |
71 |
> |
72 |
> Force explicit setting of the dependency type and disallow the mix of |
73 |
> dependency types and use flag deps at the same level / block. |
74 |
> |
75 |
> DEPENDENCIES=" |
76 |
> :build,run? ( lib/foo ) |
77 |
> :run? ( |
78 |
> lib/bar |
79 |
> someuseflag? ( random/app ) |
80 |
> ) |
81 |
> :*? ( |
82 |
> thing? ( |
83 |
> :build? ( lib/thing ) |
84 |
> :run? ( lib/thingrunner ) |
85 |
> ) |
86 |
> " |
87 |
> |
88 |
> Or, using your example: |
89 |
> |
90 |
> :build,run? ( |
91 |
> |
92 |
> |
93 |
> ruby:targets_ruby18? ( dev-lang/ruby:1.8 ) |
94 |
> ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 ) |
95 |
> ) |
96 |
> :run? ( dev-ruby/stomp ) |
97 |
> |
98 |
> Alex | wired |
99 |
|
100 |
Or, even easier and more straightforward: just keep using *DEPEND. The |
101 |
case hasn't been made yet why we need to change that in the first |
102 |
place. |
103 |
|
104 |
-- |
105 |
Cheers, |
106 |
|
107 |
Ben | yngwin |
108 |
Gentoo developer |
109 |
Gentoo Qt project lead, Gentoo Wiki admin |