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