Hi Russ,
On Tue, Dec 25, 2012 at 03:53:16PM -0800, Russ Allbery wrote:
> paul cannon <[email protected]> writes:
> 
> > I've found that I occasionally need to pass arguments with spaces in
> > them to pbuilder through git-pbuilder. For example, say I needed to
> > create a new cowdancer build environment using the distribution
> > components "main" and "contrib" both (so, I would want to pass
> > '--components "main contrib"' to pbuilder).
> 
> [...]
> 
> > As you can see, the quoting I used in GIT_PBUILDER_OPTIONS is not
> > respected, despite the language on the man page which seems to imply
> > that the contents of the variable will undergo additional shell
> > expansion inside git-pbuilder.
> 
> > This is a difficult problem to fix within the confines of POSIX sh, but
> > if we switch to bash, we can make use of the fairly-decent array
> > functionality in order to keep better track of argument lists. I'm
> > attaching a patch which does this.
> 
> Sorry for the delay in responding to this.
> 
> I hate to give up on the script being portable shell, but I agree that
> this is much cleaner and resolves various weird problem that we've had in
> the past with shell quoting.  Unfortunately, the shell quoting mechanism
> is not very straightforward.
> 
> I'm tempted to just rewrite the program in Perl, which would allow us to
> do a much better job.

Any chance this could be Python instead? This would allow us to
integrate into the gbp testsuite easily, giving us coverage information
and the like. Let me know if I can help with this.  (This is not meant
to be a language a versus language b shootout, it's just that gbp itself
is Python already)
Cheers,
 -- Guido

> 
> In the meantime, I've applied your patch and this change will be in the
> next release.  Thanks for your contribution!
> 
> -- 
> Russ Allbery ([email protected])               <http://www.eyrie.org/~eagle/>
> 


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to