Sean Whitton writes ("Re: Bug#1121818: dgit sbuild fails to honour
--force-orig-source [and 1 more messages]"):
> On Wed 03 Dec 2025 at 11:54am GMT, Ian Jackson wrote:
> > I don't think that's true. In order to special case it, we'd need to
> > parse sbuild's options. But you can't reliable parse another
> > program's options because you don't know which arguments are option
> > values.
>
> Well, sbuild is documented to have only one positional argument, so I
> think it would be okay in this case.
But it might be an option value.
$ sbuild -c --force-ignore-source
...
E: --force-ignore-source: Chroot not found
More realistically, say:
sbuild --debbuildopts --force-ignore-source
I'm surprised that you're not aware of this problem, which generally
exists whenever you try to manipulate the arguments of another,
nonconsenting, program.
This is an instance of the ubiquitous quoting/unquoting problem, which
plagues computing systems so much.
Every program's command line is its own language, which is parssed by
its argument parser. This is workable because generally one is trying
to quote a known meaning into a set of arguments, and knowledge of the
meaning involves knowledge of how *that meaning* is represented.
To *modify* a set of arguments, in the general case, is not sound,
because you don't know the "lexical" structure. It's the same
fundamental error as trying to edit arbitrary HTML with regexps.
> Certainly it would be better to get rid of them. It's just that it's
> probably a very long way off. But perhaps not so far off that it is
> worth something complex to fix this bug, indeed.
Right.
Ian.
--
Ian Jackson <[email protected]> These opinions are my own.
Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.