[Buildd-tools-devel] Bug#495490: sbuild-checkpackages --list and --set options don't work

Roger Leigh rleigh at debian.org
Sun Aug 17 22:07:56 UTC 2008


Package: sbuild
Version: 0.57.4-1
Severity: normal
Tags: patch

--list and --set don't work due to $cmd being deprecated in favour of
$mode, but $cmd is still used in the program logic after options
parsing.


diff --git a/bin/sbuild-checkpackages b/bin/sbuild-checkpackages
index 5215547..1c0adc2 100755
--- a/bin/sbuild-checkpackages
+++ b/bin/sbuild-checkpackages
@@ -44,7 +44,6 @@ usage_error("sbuild-checkpackages", "--list or --set must be specified")
     if (@ARGV != 1 || !defined($mode));
 
 my $chroot = $ARGV[0];
-my $cmd = $ARGV[1];
 
 setlocale(LC_COLLATE, "POSIX");
 $ENV{'LC_COLLATE'} = "POSIX";
@@ -71,7 +70,7 @@ if (!@status) {
     shutdown("TERM");
 }
 
-if ($cmd eq "--set") {
+if ($mode eq "set") {
     if (! open WREF, "> $chroot_dir/$package_checklist") {
 	print STDERR "Can't write reference status file $chroot_dir/$package_checklist: $!\n";
 	shutdown("TERM");
@@ -83,7 +82,7 @@ if ($cmd eq "--set") {
 	print STDERR "Error writing reference status file: $!\n";
 	shutdown("TERM");
     }
-} else { # --list
+} else { # "list"
 
     if (! open REF, "< $chroot_dir/$package_checklist") {
 	print STDERR "Can't read reference status file $chroot_dir/$package_checklist: $!\n";


Regards,
Roger


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.20.3-bytemark-uml-2
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages sbuild depends on:
ii  adduser                    3.108         add and remove users and groups
ii  apt                        0.7.14+b1     Advanced front-end for dpkg
ii  dctrl-tools                2.13.0        Command-line tools to process Debi
ii  devscripts                 2.10.35       scripts to make the life of a Debi
ii  dpkg-dev                   1.14.20       Debian package development tools
ii  perl                       5.10.0-11.1   Larry Wall's Practical Extraction 
ii  perl-modules               5.10.0-11.1   Core Perl modules
ii  postfix [mail-transport-ag 2.5.2-2lenny1 High-performance mail transport ag
ii  schroot                    1.2.1-1       Execute commands in a chroot envir

Versions of packages sbuild recommends:
ii  debootstrap                   1.0.10     Bootstrap a basic Debian system
ii  fakeroot                      1.9.5      Gives a fake root environment

Versions of packages sbuild suggests:
ii  deborphan                     1.7.25     program that can find unused packa
ii  wget                          1.11.4-1   retrieves files from the web

-- no debconf information





More information about the Buildd-tools-devel mailing list