On 17 September 2012 18:55, Alex Alexander <[email protected]> wrote: > On Sep 17, 2012 6:13 AM, "Brian Harring" <[email protected]> wrote: >> >> On Sun, Sep 16, 2012 at 07:32:39PM +0300, Alex Alexander wrote: >> > On Sep 16, 2012 4:55 PM, "Brian Harring" <[1][email protected]> >> > wrote: >> > > >> > > Folks- >> > > >> > > Keeping it short and quick, a basic glep has been written for what >> > I'm >> > > proposing for DEPENDENCIES enhancement. >> > > >> > > The live version of the doc is available at >> > > >> > >> > [2]http://dev.gentoo.org/~ferringb/unified-dependencies/extensible_depe >> > ndencies.html >> > >> > Am I the only one who thinks that this dep:{build,...} thing looks >> > really ugly and is hard to read? >> > >> > IMO simply removing the "dep" part would greatly improve things: >> >> That 'dep' part isn't great, but it's added for a reason; to unify >> with USE_EXPAND/use group intended syntax. There's a reference in >> there to >> http://www.gossamer-threads.com/lists/gentoo/dev/260069#260069 which >> I'll formalize soon enough. >> >> >> > DEPENDENCIES=" >> > :build,run? ( ... ) >> > :run? ( ... ) >> > " >> >> For your suggestion, consider it if we *do* fxi USE expand- via using >> the same <namespace>:<setting> form. >> >> Using app-admin/mcollective ad an example, it's deps are thus: >> >> DEPEND="ruby_targets_ruby18? ( dev-lang/ruby:1.8 ) >> ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )" >> RDEPEND="dev-ruby/stomp >> ruby_targets_ruby18? ( dev-lang/ruby:1.8 ) >> ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )" >> >> Which, if USE_EXPAND targets were groupped, would go from this >> ruby_targets_ruby18? ( dev-lang/ruby:1.8 ) >> ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 ) >> dep:run? ( dev-ruby/stomp )" >> >> to this: >> ruby:targets_ruby18? ( dev-lang/ruby:1.8 ) >> ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 ) >> :run? ( dev-ruby/stomp ) > > Ok, now I get it. I've read the other threads as well, but failed to put it > all together. Happens when you barely sleep every night :-) > > I don't like this mix of dependency types and use flag deps. It smells > trouble. Dependency types should be easy to separate and read, but the above > example is a mess, "dep:" or no "dep:". > > Why? Because you have to scan the whole thing to sort out which lines are > dependency types and which lines are use deps and even then it would be easy > to misread something. > > If we want to stay away from labels (which aren't that bad IMO), I'd > recommend the following instead: > > Force explicit setting of the dependency type and disallow the mix of > dependency types and use flag deps at the same level / block. > > DEPENDENCIES=" > :build,run? ( lib/foo ) > :run? ( > lib/bar > someuseflag? ( random/app ) > ) > :*? ( > thing? ( > :build? ( lib/thing ) > :run? ( lib/thingrunner ) > ) > " > > Or, using your example: > > :build,run? ( > > > ruby:targets_ruby18? ( dev-lang/ruby:1.8 ) > ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 ) > ) > :run? ( dev-ruby/stomp ) > > Alex | wired
Or, even easier and more straightforward: just keep using *DEPEND. The case hasn't been made yet why we need to change that in the first place. -- Cheers, Ben | yngwin Gentoo developer Gentoo Qt project lead, Gentoo Wiki admin
