[buildd-tools-devel] Bug#599380: Bug#599380: schroot: schroot grabs options intended for commands

Roger Leigh rleigh at codelibre.net
Thu Oct 7 14:16:34 UTC 2010


On Thu, Oct 07, 2010 at 04:39:32PM +1300, Simon Guest wrote:
> Package: schroot
> Version: 1.4.12-1
> Severity: normal
> 
> schroot is grabbing options which occur after a command, which ought
> surely to be passed to that command.  e.g.
> 
> $ schroot -c lenny-amd64 uname
> Linux
> $ schroot -c lenny-amd64 uname -a
> W: --chroot and --all may not be used at the same time
> I: Using --chroots only
> Linux
> 
> Oops, that -a should be passed to uname, not taken to mean schroot -a.

You want to use
schroot -c lenny-amd64 -- uname -a

This is a standard conventions when parsing command-line options.
The "--" option marks the end of the program options and the start
of non-option arguments (i.e. the command you want to run).  This
means that "uname" and "-a" are passed verbatim and not treated as
options at all.

This is mentioned in the Examples section of the schroot(1) manual
page.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20101007/1340d57c/attachment.pgp>


More information about the Buildd-tools-devel mailing list