Bug#378028: [Buildd-tools-devel] Bug#378028: "E: Only one command may be specified"

Roger Leigh rleigh at whinlatter.ukfsn.org
Wed Jul 12 21:22:13 UTC 2006


severity 378028 important
tags 378028 + confirmed
thanks

David Liontooth <liontooth at cogweb.net> writes:

>>>  #!/bin/bash
>>>  ARGS=""
>>>  for i in "$@" ; do
>>>  ARGS="$ARGS '$i'"
>>>  done
>>>     
>>>  exec dchroot -c ia32 -d -q "`basename $0`" "$ARGS"
>>>
>>> I symlink the application to this script and it runs in chroot. Now 
>>> I get this error:
>>>
>>>  $ oowriter
>>>  E: Only one command may be specified
>>>  I: Run "dchroot --help" to list usage example and all available options
>>>     
>>
>> 0.99.0 used a command-line options syntax incompatible with previous
>> releases.  The old behaviour was restored in 0.99.1, and this has been
>> the same since then.
>>
>> This is documented in the NEWS file (/usr/share/doc/schroot/NEWS.gz)
>>   
> I don't see this file in the schroot package; could you please check?

Ah, I'm using an unreleased version.  It's not packaged in the version
you have (but it's in the source package).

>> and also in the dchroot(1) manual page.
>>
> Right, I see that.
>
> My system is currently working fine with dchroot 0.13, and it appears I
> need to understand in some detail how schroot and dchroot works in order
> to make things work with the new packages.

The new dchroot (all versions except 0.99.0) should be 100% compatible
with dchroot 0.13 and earlier.  If it isn't, that's a bug we need to
fix.

Just checking the dchroot sources... it does concatenate subsequent
arguments with ' ' separators.  It's pretty nasty (think about the
quoting issues), but we should also be doing that.  We aren't
currently doing that, so this is a bug.  I'll get that fixed ASAP.

>>>  exec dchroot -c ia32 -d -q "`basename $0`" "$ARGS"

Just to be sure: this does work with 0.13 ?

> My system is currently working fine with dchroot 0.13, and it
> appears I need to understand in some detail how schroot and dchroot
> works in order to make things work with the new packages.  I'll
> stick with 0.13 until new and working shell scripts for schroot are
> available.

OK.  If you want reliable quoting in your scripts, the only solution
is to use schroot where you can do

schroot -c chroot -- command "$@"

which requires no special quoting, and copes with whitespace in the
arguments and everything (it's passed directly to execve(2) with no
mangling and demangling required).

So I would recommend schroot for your usage of dchroot, due to it
making the script simpler.  The "Migration" section in the manual page
will show you how to proceed.  In the meantime, I'll look at getting
this fixed.

When I have a fixed version, would you be willing to test a
prerelease?


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 sign and encrypt your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20060712/4ee4192a/attachment-0001.pgp


More information about the Buildd-tools-devel mailing list