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

Re: build profile syntax ideas



Hi,

Quoting David Kalnischkies (2013-04-28 14:27:12)
> On Tue, Apr 23, 2013 at 9:15 PM, Johannes Schauer <j.schauer@email.de> wrote:
> > Indeed it is, but the dot would be forbidden to be part of scope names and
> > their values and the package name would be separated from a potential
> > "<scope>.<value>" by a colon like: "<packagename>:<scope>.<colon>", no?
> 
> Ahhhh. Misunderstanding then. I thought of it more as a problem of:
> Find values for X and Y so that it makes sense (and is esthetically pleasant):
> <packagename>X<scope>Y<value>:<arch>

Since more than one profile at a time can be specified when building a source
package, this should probably rather be:

<packagename>(X<scope>Y<value>)*(:<arch>)?

So that it is also possible to depend upon binary packages that were built with
multiple profiles enabled.

> My answer: X=~ and Y=. (or anything else expect : really)
> As this is something you will have potentially as output in APT/dpkg and
> as dependencies.
> 
> But given that <arch> is "only" a special type of <scope>Y<value>
> we are better of with X=: and therefore potential multiple ":" even though
> its a bit unusual at first.

I agree to allow having multiple ":". I dont think the following looks too bad
and it is certainly better memorable than having to learn just another
character with a special meaning when already the Y is new:

foobar:profile.stage1:profile.cross:amd64

> Remains the problem of setting Y:
> Y=% looks really noisy, but beside that it is used for encoding its free.
> Y=# I would really hate that - shells will think this is a comment …
> Y=: feels just wrong to have Y == X
> Y=~ really looks strange there, beside that okay I guess
> Y=.
> …

What about

Y = "="

This value was suggested by Raphael Hertzog in the other branch of this thread.
Example:

Build-Depends: foobar:profile=stage1:amd64 [amd64] [profile=stage2]

I also thought about the possibility of allowing "=" and "!=" for Y so that one
is able to specify a profile a binary package had to be built with as well as a
profile it should not have been built with (they can do this in Gentoo wrt its
USE flags which are similar to build profiles). But then I realized that it is
probably more natural to just prepend a "!" to the <scope>=<value> tuple just
as it is done in the qualifier like this:

Build-Depends: foobar:!profile=stage1:amd64 [amd64] [!profile=stage2]

In any case - for the sake of the "Bootstrappable Debian GSoC" we only have to
decide about the qualifier syntax right now and talking about a potential
dependency upon binary packages that were built (or not built) with a certain
profile is (so far) only good for deciding on a good value for "Y".

> But the character used in the "power plant" should be chosen carefully, as it
> has effects on the "bikeshed"(s) and it would be bad to have different
> characters in the "power plant" and "bikeshed"(s) for the same thing.  (In
> that case "carefully" is probably just "not :" and the rest bikeshed)

And here you were talking about the ":" in the qualifier or in the name of the
build dependency?

It probably makes most sense to separate <scope> and <value> by the same
character in the qualifier AND in the dependency name, right? For example in
OCaml it is horribly confusing to call a function with a named argument with
name:value but in the function definition it is name=value - this leads to
confusion all the time. So probably the separator should really be the same in
both places and therefor I agree that everything except ":" works.

If nobody objects, I would then embark in implementing a patch for dpkg which
implements the following syntax:

Build-Depends: huge (>= 1.0) [amd64 i386] [profile=stage1 profile=cross], tiny

If we find a better value for Y, it can easily be changed later. Having a patch
ready will allow us to talk about more specific issues.

cheers, josch


Reply to: