#1108881 --extra-repository="deb foo.. writes quotes to sources.list

#1108881#5
Date:
2025-07-06 17:46:23 UTC
From:
To:
Hi,

when I call sbuild --extra-repository="deb http://my.host/debian suite
component", the quotes end up in
/etc/apt/sources.list.d/sbuild-extra-repositories.list which is
syntactically incorrect.

Wrapping arguments containing spaces in quotes is a rather common idiom.
sbuild's behavior is a surprise here.

And it would really be nice if sbuild -D would give in the debug output
what actually gets written to the sbuild-extra-repositories.list file,
that would have saved me an hour of debugging and pulling the strong
from an strace.

Greetings
Marc

#1108881#10
Date:
2025-07-06 18:17:29 UTC
From:
To:
Hello Marc,

* Marc Haber <mh+debian-packages@zugschlus.de> [250706 19:49]:

I tried reproducing this, but failed. My understanding is that this
quoting style is usually necessary because of what your shell would
otherwise do the argument (split it). Thus I assume you are running
the given example from such a shell, like bash.

I hacked up ResolverBase.pm to print out the file that was created,
and got this:

$ sbuild --extra-repository="deb deb http://my.host/debian suite component" -d unstable hello
...
I: Setting up apt archive...


deb deb http://my.host/debian suite component


So, no quotes here.

Maybe your invocation is different. Can you provide a full
reproducer, and how you found out about the extra quotes?

Best,
Chris