Bug#410575: [Pbuilder-maint] Bug#410575: pbuilder: better document --debootstrapopts arguments with spaces

Filippo Giunchedi filippo at debian.org
Wed Feb 14 16:07:17 UTC 2007


On Wed, Feb 14, 2007 at 11:05:22PM +0900, Junichi Uekawa wrote:
> > > The same applies to --debuildopts IIRC, this is slightly related to #229834 as
> > > well.
> > 
> >  I don't think so, I use spaces in debuildopts to pass multiple options,
> >  for example --debbuildopts "-vx.y -sa".
> > 
> >  Perhaps this bug is about having spacing support in --debootstrapopts?
> 
> Documentation would be nice.
> 
> Changing command-line option behavior is destructive to existing scripts and should be avoided.

Currently using a space as a --debootstrapopts argument to separate its
arguments won't work anyway as debootstrap parses that as a non-option:

--debootstrapopts "--help -a=i386"

correctly gives

+ cdebootstrap --variant=buildd '--help -a=i386' sid . http://127.0.0.1/debian
cdebootstrap: unrecognized option `--help -a=i386'

and you are expected to pass cdebootstrap only options, as passing a valid
non-option will result in debootstrap having too much arguments:

--debootstrapopts testing

+ cdebootstrap --variant=buildd testing sid . http://127.0.0.1/debian
cdebootstrap: too much arguments

so yes, this bug is really about properly supporting spaces within
--debootstrapopts arguments

I'm not sure about the correct way to implement this, the most obvious is to
save IFS, use IFS=' ' during debootstrap invocation and restore IFS after that.

However, this is a proposed patch to the man page:

--- /tmp/Q7UxfBjLcP-pbuilder.8  2007-02-14 17:04:09.940839524 +0100
+++ /tmp/y6gOWXELkB-pbuilder.8  2007-02-14 17:04:09.948839524 +0100
@@ -482,8 +482,9 @@

 .TP
 .BI "\-\-debootstrapopts " "\-\-variant=buildd"
-Add extra command-line options to debootstrap.
+Add extra command-line option to debootstrap in the form of --option=value.

+This option can be used multiple times to pass debootstrap multiple options.
 .TP
 .BI "\-\-debootstrap " "debootstrap"
 Use specified debootstrap implementation as debootstrap.


Although I prefer properly supporting arguments with spaces, as it is not going
to break anything. And mentioning "you can't use spaces" in the man page just
looks silly :)

my two cents,
filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

If there is any better use for being famous and respected than using
that status to question orthodoxy, I haven't found it yet.
-- Eric S. Raymond
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20070214/da2dd39c/attachment.pgp


More information about the Pbuilder-maint mailing list