On 19/02/26 13:26, Guillem Jover wrote:
On Thu, 2026-02-19 at 10:12:56 +0100, Gioele Barabucci wrote:
On 19/02/26 03:47, Guillem Jover wrote:
Could `--arch=foo` be modified to mean "strictly foo, without all"?
Alternatively could a new option like `--arch-strict=foo` be
introduced, if you believe that the old behavior should not change?
I don't think changing the semantics for --arch would be correct, as
this is how it has been documented, and how people have relied on this
option working. Instead I've added a new --no-implicit-arch option,
which removes the implicit addition of the arch-all packages, so then
you can run twice with --arch=foo and then --arch=all for example.
If I am allowed to bikeshed a bit, as a user I'd find
--no-implicit-arch-all
or
--no-implicit-archs
more explicit and easier to spot when looking for that kind of
change of semantics. (Inner dialogue: "no implicit arch? which arch
is implicit?".)
I actually started with --no-arch-all, but then when I was testing
that, it started to look very odd or even confusing, for example with:
$ dpkg-scanpackages --no-arch-all --arch=all .
Yeah, that is slightly confusing.
And while --no-implicit-arch-all, at least makes clear it's about the
arch being implicit, it also seemed very long (so less ergonomic).
Better long than confusing, right? :)
I'm
not sure I see a difference with using the plural archs though. :)
For me `--no-implict-arch` raises the question "which arch is implicit?
arch-all, the one I'm running this command from? what about a
cross-compiled dpkg?", while `--no-implicit-archs` is simply "no archs
will be implicitly added", something that does not require additional
thought.
A final suggestion. Maybe using a positive statement helps?
"--only-requested-arch" or "--only-arch"?
Regards,
--
Gioele Barabucci