#1115518 sbuild: maybe --arch-all could imply --no-arch-any?

Package:
sbuild
Source:
sbuild
Submitter:
Étienne Mollier
Date:
2025-11-20 09:11:01 UTC
Severity:
normal
Tags:
#1115518#5
Date:
2025-09-17 19:00:18 UTC
From:
To:
Dear Maintainer,

I've got caught a bit by surprise by #1115489 despite an
associated Salsa CI default pipeline normally aimed at capturing
the common regression of arch-all only build failures.  Having a
look at the build log[1], I noticed that the build command was
missing --no-arch-any flag in addition of the --arch-all.
Therefore, I have informed the Salsa CI team[2].

[1]: https://salsa.debian.org/med-team/altree/-/jobs/8300242
[2]: https://salsa.debian.org/salsa-ci-team/pipeline/-/issues/499

Now to the sbuild point: when wrapping up messages, it occurred
to me that perhaps specifying --arch-all explicitly should imply
that an arch-any bulid is not wanted.  I feel that having both
binary-all and binary-any builds out of a plain --arch-all flag
is surprising.  Currently I see the following behavior when
passing --arch-all and --arch-any build options, without passing
any --no-arch-* option otherwise:

	none  --arch-all  --arch-any | implied outcome
	----  ----------  ---------- + ---------------------
	  *                          | --arch-all --arch-any
	           *                 | --arch-all --arch-any
	                       *     | --arch-all --arch-any
	           *           *     | --arch-all --arch-any

Do you think it would make sense to have a behavior looking like
the following instead?

	none  --arch-all  --arch-any | implied outcome
	----  ----------  ---------- + ----------------------------------
	  *                          | --arch-all --arch-any (no changes)
	           *                 | --arch-all --no-arch-any
	                       *     | --no-arch-all --arch-any
	           *           *     | --arch-all --arch-any (no changes)

I have not thought too much of the implications of such
behavioral change and I could be missing some big picture here,
thus the wishlist rating.

Have a nice day,  :)
Étienne.

#1115518#10
Date:
2025-09-19 13:44:09 UTC
From:
To:
Hi,

Quoting Étienne Mollier (2025-09-17 21:00:18)

sbuild is being used in all corners to automate package builds. The
--{no-,}arch-{all,any} options have a well defined meaning and are among the
more popular options. I do not think that it makes sense to break existing
users of these options.

Instead, how about having an option which mimics dpkg-buildpackage's --build
option? That option would take the same arguments and enable all/any/source
builds as requested. Patches welcome.

Thanks!

cheers, josch

#1115518#15
Date:
2025-11-20 09:09:38 UTC
From:
To:
Hi josch,

Thank you for the hint, I thought some time about implementing
something, but kept running into the problem of finding a good
name for the argument: one I would be happy to use and that does
not clash with existing sbuild arguments.  Naming things is
hard.  In the meantime, I witnessed other occurrences of the
confusion in the wild.  What I can offer is a small adjustment
to the documentation, to leave a message to the unwary in the
manual:
-------8<--------------8<--------------8<--------------8<------- diff -Nru sbuild-0.91.1/man/sbuild.1.in sbuild-0.91.1+eml1/man/sbuild.1.in --- sbuild-0.91.1/man/sbuild.1.in 2025-10-08 14:13:20.000000000 +0200 +++ sbuild-0.91.1+eml1/man/sbuild.1.in 2025-11-20 09:48:43.000000000 +0100 @@ -229,6 +229,12 @@ This command line option sets the \fBBUILD_ARCH_ALL\fP configuration variable. See .BR sbuild.conf (5) for more information. +.IP +.B Warning: +since \-\-arch\-any is also default for native builds, +it is necessary to pass \-\-no\-arch\-any to issue an "Architecture: all" only build. +A common error when testing builds is to assume \-\-no\-arch\-any is implied by \-\-arch\-all, +which is actually not the case. .TP .BR "\-\-no\-arch\-all" Do not build Architecture: all packages. This is the default behaviour for cross builds. This @@ -249,6 +255,12 @@ This command line option sets the \fBBUILD_ARCH_ANY\fP configuration variable. See .BR sbuild.conf (5) for more information. +.IP +.B Warning: +since \-\-arch\-all is also default for native builds, +it is necessary to pass \-\-no\-arch\-all to issue an "Architecture: any" build. +A common error when testing builds is to assume \-\-no\-arch\-all is implied by \-\-arch\-any, +which is actually not the case. .TP .BR "\-\-no\-arch\-any" Do not build Architecture: any packages. This option is the opposite -------8<--------------8<--------------8<--------------8<------- It is some wording I came up with, but feel free to adjust if you think of a better description. I'm happy with seeing the bug closed with the documentation adjusted. Does that sound fair enough? Have a nice day, :) -- .''`. Étienne Mollier <emollier@debian.org> : :' : pgp: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da `. `' sent from /dev/pts/3, please excuse my verbosity `- on air: Magic Pie - Circus of Life part 5, The Clown