[buildd-tools-devel] Bug#607606: sbuild-createchroot: broken option parser

Lionel Le Folgoc mrpouit at gmail.com
Mon Dec 20 08:09:06 UTC 2010


Package: sbuild
Version: 0.60.7-1
Severity: normal
File: /usr/sbin/sbuild-createchroot

Hi,

Sbuild-createchroot works fine in simple cases, e.g.:
$ sudo sbuild-createchroot sid /tmp/schroot-Tjf2hL http://ftp.fr.debian.org/debian

However, when I tried to create an i386 chroot, it had a weird behavior:
$ sudo sbuild-createchroot --arch=i386 sid /tmp/test http://ftp.uk.debian.org/debian

mkdir sid
I: SUITE: --arch=i386
I: TARGET: /tmp/sid
I: MIRROR: /tmp/test
I: SCRIPT: http://ftp.uk.debian.org/debian
I: Running debootstrap --arch=amd64 --variant=buildd --verbose --include=fakeroot,build-essential,debfoster --components=main --keyring=/etc/apt/trusted.gpg --resolve-deps --arch=i386 /tmp/sid /tmp/test http://ftp.uk.debian.org/debian
E: No such script: /usr/share/debootstrap/scripts//tmp/sid
E: Error running debootstrap at /usr/sbin/sbuild-createchroot line 201.

All args are shifted because of --arch=i386: this one should be passed to
debootstrap directly, but it isn't and breaks the next options.

I thought the manpage wasn't up-to-date, so I tried to see the program version and help:

$ sbuild-createchroot --version
E: Incorrect number of options
I: Run “sbuild-createchroot --help” to list usage example and all available options

$ sbuild-createchroot --help
E: Incorrect number of options
I: Run “sbuild-createchroot --help” to list usage example and all available options


Options' parsing seems rather broken; it's a bit annoying when we need to pass
options to debootstrap (as I'm not very fluent in Perl, I can't propose a
patch, sorry -- for the moment, I edit the default config in the script when I
want to pass a special option ;).

Thanks!

Regards,
Lionel

-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37-rc5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sbuild depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  libsbuild-perl                0.60.7-1   Tool for building Debian binary pa
ii  perl                          5.10.1-16  Larry Wall's Practical Extraction 
ii  perl-modules                  5.10.1-16  Core Perl modules

Versions of packages sbuild recommends:
ii  debootstrap                   1.0.26     Bootstrap a basic Debian system
ii  fakeroot                      1.14.5-1   Gives a fake root environment

Versions of packages sbuild suggests:
ii  deborphan                     1.7.28.3   program that can find unused packa
ii  wget                          1.12-2.1   retrieves files from the web

-- no debconf information





More information about the Buildd-tools-devel mailing list