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

Re: ORed build profiles



On 11/24/25 00:12, Johannes Schauer Marin Rodrigues wrote:
Quoting Ben Hutchings (2025-11-24 00:00:56)
On Sun, 2025-11-23 at 08:07 +0100, Matthias Klose wrote:
[...]
However when adding additional pkg.llvm.noflang, pkg.llvm.nolld, ...
build profiles for some more fine grained control (attached diff), as in

    Package: lld-21
    Build-Profiles: <!pkg.llvm.noclang> + <!pkg.llvm.nolld>

then all the packages with an ORed build profile are NOT built by
default.  I'm not expecting this.  dpkg doesn't complain about the
syntax of this field.

Looking at
https://wiki.debian.org/BuildProfileSpec#The_Package-List_field

the spec seems to be a little bit ambiguous about that field, not giving
a spec, but just some examples, and no example for ORed build profiles,
and not explaining what the examples are supposed to do.

There's also nothing told about the precedence of the operators, (NOT
(!), OR (+), AND (,)).
[...]

For the Build-Profiles field, "the same restriction formula syntax from
the Build-Depends field is used", and I think that is adequately
documented.

For the Package-List field I think the syntax is changed just to avoid
whitespace in the expression.

Yes, that was the reasoning we used back then.

There is also a good chance that build profiles will be part of Debian Policy
soon. The latest version of the text (last message in the bug) is much better
written than the BuildProfileSpec page in the Debian wiki and might thus be a
better document to read to understand how it is supposed to work:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757760

thanks for the pointer to the report.

sorry, the last proposed text again doesn't explicitly talk about the Build-Profiles attribute. There are too many "I think"'s here, and e.g. claims that these don't support ORs, while the spec *is* talking about ANDing and ORing.

"Thinking" in a spec should be avoided. Plus dpkg apparently doesn't properly check the supposed/intended syntax.

Please be explicit about the Build-Profiled attribute, and give some examples like you did for the Build-Depends field.

The spec should be explicit about
 - Are <> part of the list?
 - Where is whitespace allowed/prohibited?
 - Having examples for the Build-Profiles attribute, without referencing
   the Build-Depends attribute.

Please update the spec.

Matthias


Reply to: