tags 363351 + patch fixed-upstream pending
thanks

Martin Michlmayr <[EMAIL PROTECTED]> writes:

> /usr/share/sbuild/checkchroot unstable gives me the following:
>
> Use of uninitialized value in string comparison (cmp) at 
> /usr/share/sbuild/checkchroot line 80.
> Use of uninitialized value in concatenation (.) or string at 
> /usr/share/sbuild/checkchroot line 87.
>
> The problem is that this is repeated very often (probably
> infinitely) and it has just filled my log file, causing my disk
> space to run out...

Sorry about that.  I've applied the following patch to SVN to fix
this:

Index: bin/checkchroot
===================================================================
--- bin/checkchroot     (revision 553)
+++ bin/checkchroot     (working copy)
@@ -21,7 +21,7 @@
 use warnings;
 use locale;
 use POSIX qw(locale_h);
-use Sbuild::Utility qw(setup cleanup);
+use Sbuild::Utility qw(setup cleanup shutdown);
 
 package main;
 
@@ -41,7 +41,7 @@
 
 if (! open STATUS, "grep-status -F Status -s Package ' installed' 
'$chroot_dir/var/lib/dpkg/status' | awk '{print \$2}' |" ) {
        print STDERR "Can't read dpkg status file in chroot: $!\n";
-       main::shutdown();
+       shutdown();
 }
 while (<STATUS>) {
        chomp;
@@ -49,14 +49,14 @@
 }
 if (! close STATUS) {
        print STDERR "Error reading dpkg status file in chroot: $!\n";
-       main::shutdown();
+       shutdown();
 }
 
 my $dist = Sbuild::Utility::get_dist($ARGV[0]);
 
 if (! open REF, "< $chroot_dir/../ref-$dist") {
        print STDERR "Can't read reference status file 
$chroot_dir/../ref-$dist: $!\n";
-       main::shutdown();
+       shutdown();
 }
 while (<REF>) {
        chomp;
@@ -64,12 +64,21 @@
 }
 if (! close REF) {
        print STDERR "Error reading reference status file: $!\n";
-       main::shutdown();
+       shutdown();
 }
 
 @status = sort @status;
 @ref = sort @ref;
 
+if ([EMAIL PROTECTED]) {
+    print STDERR "dpkg status file is empty\n";
+    shutdown();
+}
+if ([EMAIL PROTECTED]) {
+    print STDERR "Reference status file is empty\n";
+    shutdown();
+}
+
 print "DELETE             ADD\n";
 print "======================================\n";
 my $i = 0;


-- 
Roger Leigh
                Printing on GNU/Linux?  http://gutenprint.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.

Attachment: pgpexbcC3WmAW.pgp
Description: PGP signature

Reply via email to