[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.4-23-g0ca5608



The following commit has been merged in the master branch:
commit 740109afa6a26855edf4fc460d36cf1d16665d7c
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Dec 4 10:19:54 2011 +0100

    Properly strip whitespace when loading collection status
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index 12cafc8..b33f96d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -42,6 +42,8 @@ lintian (2.5.5) UNRELEASED; urgency=low
   * lib/Lintian/Lab.pm:
     + [NT] Added "is_temp" method to identify temp labs from static
       labs.
+  * lib/Lintian/Lab/Entry.pm:
+    + [NT] Properly strip whitespace when loading collection status.
   * lib/Lintian/Processable/Package.pm:
     + [NT] Use part of the file name as package name if the mandatory
       "Package" or "Source" fields are missing rather than choking.
diff --git a/lib/Lintian/Lab/Entry.pm b/lib/Lintian/Lab/Entry.pm
index 4d809cb..c00b7c7 100644
--- a/lib/Lintian/Lab/Entry.pm
+++ b/lib/Lintian/Lab/Entry.pm
@@ -393,9 +393,13 @@ sub _init {
 
     $coll = $head->{'collections'}//'';
     $coll =~ s/\n/ /go;
+    # Strip leading and trailing space to avoid "interesting" issues
+    # with the "first" collection having leading spaces.
+    $coll =~ s/^\s++//go;
+    $coll =~ s/\s++$//go;
     foreach my $c (split m/\s*,\s*+/o, $coll) {
         my ($cname, $cver) = split m/\s*=\s*/, $c;
-        $self->{coll}->{$cname} = $cver;
+        $self->_mark_coll_finished ($cname, $cver);
     }
 }
 

-- 
Debian package checker


Reply to: