[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: build profile syntax ideas



+++ Johannes Schauer [2013-05-18 10:13 +0200]:
> Hello again,
> 
> Quoting David Kalnischkies (2013-04-23 20:01:10)
> > On Tue, Apr 23, 2013 at 12:14 AM, Johannes Schauer <j.schauer@email.de> wrote:
> > > Otherwise, the advantage of the second is, that it prevents mixing
> > > different scopes in one [...] qualifier and is also a bit shorter (but also
> > > more irregular).
> > 
> > I don't see the benefit of enforcing rules on which scopes can be mixed in
> > one […] qualifier. Sure, you can make it a bit simpler, but I am not sure if
> > it isn't biting us back one day if we can't mix scopes. Always a bit hard to
> > imagine the future, but that we mix 'kernel' and 'arch' in one scope is good
> > enough for me to belief that "one scope ought to be enough for anybody" might
> > not be true in the end.
> 
> I'm having trouble with implementing this and not breaking the API of
> Dpkg::Deps::Simple and Dpkg::Deps::Multiple
> 
> Consider the following line:
> 
>     Build-Depends: foo [amd64 profile.stage1] [i386 amd64]
> 
> Which translates to: depend on foo if hostarch==amd64 or if hostarch is either
> i386 or amd64 and stage1 compilation is required.
> 
> This is just a synthetic example. It might not make any sense to mix
> architectures with profiles but maybe there is/will be a scope which makes
> sense to mix with architectures. 

> So either the functions have to get additional arguments specifying which other
> scopes/values should be considered enabled or this info is stored in
> Dpkg::Deps::Simple itself.

[snip issues]

> Alternatively, this can all be circumvented by requiring that a [] bracket pair
> with architectures inside must not appear more than once in the qualifier list
> plus that the list that does contain the architectures must not contain any
> other scope type (no mixing with architectures).

In the interests of making some progress, I suggest that we simply say
that arches and profiles can't be mixed in a [], as otherwise we'd
have to change the dpkg API, and no-one seems very keen on that. 

Yes it would be nicer, but no-one has thought of a case where it's
important. We didn't need any such thing with the <> syntax, so if the
dpkg maintainers want to avoid changing the API, and we can do that by
only accepting a slightly stricter syntax, then lets do that.

The current iteration of the Spec, after some refinement at debconf, is here:
https://wiki.debian.org/BuildProfileSpec

So I think I am suggesting that the entry "We propose that literals of
different namespaces can be mixed within a disjunction. Therefore, the
following would be legal:

Build-Depends foo [arch.i386 !profile.cross]"

Is changed to say that you can't do that, and have to do [i386]
[!profile.cross] instead.

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


Reply to: