Hello, On Wed 03 Dec 2025 at 01:22pm GMT, Ian Jackson wrote:
> 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.
I see what you mean. I suppose I would have figured this out had I
tried to implement it :)
--
Sean Whitton
signature.asc
Description: PGP signature

