Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.devel > #119706
| From | Simon McVittie <smcv@debian.org> |
|---|---|
| Newsgroups | linux.debian.devel |
| Subject | Re: ORed build profiles |
| Date | 2025-11-24 18:30 +0100 |
| Message-ID | <LUIxX-frqz-1@gated-at.bofh.it> (permalink) |
| References | <LUcop-f5T8-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, 23 Nov 2025 at 08:07:15 +0100, Matthias Klose wrote:
>Trying to work with ORed build profiles, either I fail to understand
>how to work with these, or something is wrong with the implementation.
Some working examples, from src:glib2.0, which illustrate both ORed and
ANDed build-deps:
# B-D on dbus-daemon, etc. if (!nocheck) || (!noinsttest)
Build-Depends:
dbus-daemon <!nocheck> <!noinsttest>,
# B-D-A on cross-exe-wrapper if (cross && !nogir)
Build-Depends-Arch:
cross-exe-wrapper <cross !nogir>,
To vary whether a package is built, you use the same syntax, but in the
Build-Profiles field. So for example libglib2.0-tests is only built if
installed tests and GIR are both enabled, which is written like this:
# Build if (!noinsttest) && (!nogir)
Package: libglib2.0-tests
Build-Profiles: <!noinsttest !nogir>
I can never remember that <a b> means "a AND b" and <a> <b> means "a OR
b" (half the time I try to use them the other way round, which is
wrong), so I've got into the habit of always adding a comment to
indicate intent whenever something depends on a combination of two or
more build profiles.
The different syntax involving commas and plus signs as described in
https://wiki.debian.org/BuildProfileSpec#The_Package-List_field is
specific to the Package-List field, and is not used in Build-Depends or
Build-Profiles. In fact, that section of the wiki page does have a
concrete example of a valid Build-Profiles field (followed by its
translation into Package-List syntax).
The comma and plus sign are also quite confusing - if the Package-List
is a context where whitespace and angle brackets can't be used, I would
have expected something more like cross&!nocheck|nopython, but
presumably there are syntax restrictions that rule out & and | in that
context as well?
smcv
Back to linux.debian.devel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ORed build profiles Matthias Klose <doko@debian.org> - 2025-11-23 08:10 +0100
Re: ORed build profiles Bastian Blank <waldi@debian.org> - 2025-11-23 08:40 +0100
Re: ORed build profiles Ben Hutchings <ben@decadent.org.uk> - 2025-11-24 00:10 +0100
Re: ORed build profiles Johannes Schauer Marin Rodrigues <josch@debian.org> - 2025-11-24 00:20 +0100
Re: ORed build profiles Matthias Klose <doko@debian.org> - 2025-11-24 06:50 +0100
Re: ORed build profiles Simon McVittie <smcv@debian.org> - 2025-11-24 18:30 +0100
Re: ORed build profiles Guillem Jover <guillem@debian.org> - 2025-12-03 02:30 +0100
csiph-web