The following commit has been merged in the master branch:
commit 42d37478a9b4a004086569d02ccf19b20f08557e
Author: Niels Thykier <[email protected]>
Date:   Sun Jun 30 10:10:41 2013 +0200

    c/debconf.pm: Use $info->binaries
    
    Signed-off-by: Niels Thykier <[email protected]>

diff --git a/checks/debconf.pm b/checks/debconf.pm
index 79ce105..2a2c842 100644
--- a/checks/debconf.pm
+++ b/checks/debconf.pm
@@ -68,14 +68,8 @@ my $usespreinst='';
 my $usesmultiselect='';
 
 if ($type eq 'source') {
-    my $binaries = $info->field('binary');
-    # no binary field?  There is not much we can do about it here.
-    return unless defined $binaries;
-    # do not trust the contents of that field any further than we can
-    # throw it.
-    return unless $binaries =~ m{^$PKGNAME_REGEX (?:\s*+ , \s*+ 
$PKGNAME_REGEX)*+ $}xsm;
-    chomp $binaries;
-    my @files = map { "$_.templates" } split /,\s+/, $binaries;
+    my @binaries = sort($info->binaries);
+    my @files = map { "$_.templates" } @binaries;
     push @files, 'templates';
 
     foreach my $file (@files) {
@@ -84,8 +78,8 @@ if ($type eq 'source') {
         $binary =~ s/\.?templates$//;
         # Single binary package (so @files contains "templates" and
         # "binary.templates")?
-        if (!$binary && $#files == 1) {
-            $binary = $binaries;
+        if (!$binary && @files == 2) {
+            $binary = $binaries[0];
         }
 
         if (-f $templates_file) {

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to