The following commit has been merged in the master branch:
commit 59c84b7c6cdbf90588c2c1ca9c9aa73363444b1f
Author: Adam D. Barratt <[EMAIL PROTECTED]>
Date:   Sat Jul 5 14:56:58 2008 +0100

    Fix an off-by-one in the "single binary source" detection
    
    Also simplify building of the list of templates files to look for

diff --git a/checks/debconf b/checks/debconf
index 5c0770b..e20c73a 100644
--- a/checks/debconf
+++ b/checks/debconf
@@ -72,11 +72,8 @@ if ($type eq 'source') {
     open(BINARY, '<', "fields/binary") or fail("Can't open fields/binary: $!");
     my $binaries = <BINARY>;
     close BINARY;
-    my @files;
-    foreach my $binary (split /,\s+/, $binaries) {
-       chomp $binary;
-       push @files, "$binary.templates";
-    }
+    chomp $binaries;
+    my @files = map { "$_.templates" } split /,\s+/, $binaries;
     push @files, "templates";
 
     foreach my $file (@files) {
@@ -85,7 +82,7 @@ if ($type eq 'source') {
        $binary =~ s/\.?templates$//;
        # Single binary package (so @files contains "templates" and
        # "binary.templates")?
-       if (!$binary and $#files > 1) {
+       if (!$binary and $#files == 1) {
            $binary = $binaries;
        }
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to