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

[SCM] Debian package checker branch, master, updated. 2.5.0-1-gaefd5f0



The following commit has been merged in the master branch:
commit aefd5f0e4842a46b399b5b25c72bd97c33d7543e
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Fri May 13 20:24:40 2011 +0100

    Stop making assumptions about the order of fields in Sources.gz
    
    * unpack/list-srcpkg:
      + [ADB] Don't rely on the order of fields in the Sources file.  The files
        produced by the Debian archive no longer follow the order which the code
        previously assumed, and we shouldn't assume that the order won't change
        again in the future.  (Closes: #626597)

diff --git a/debian/changelog b/debian/changelog
index 69744fd..1e9e50d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+lintian (2.5.1) unstable; urgency=low
+
+  * unpack/list-srcpkg:
+    + [ADB] Don't rely on the order of fields in the Sources file.  The files
+      produced by the Debian archive no longer follow the order which the code
+      previously assumed, and we shouldn't assume that the order won't change
+      again in the future.  (Closes: #626597)
+
+ -- Adam D. Barratt <adam@adam-barratt.org.uk>  Fri, 13 May 2011 20:20:51 +0100
+
 lintian (2.5.0) unstable; urgency=low
 
   * Summary of tag changes:
diff --git a/unpack/list-srcpkg b/unpack/list-srcpkg
index 738963d..e437e9b 100755
--- a/unpack/list-srcpkg
+++ b/unpack/list-srcpkg
@@ -107,11 +107,18 @@ foreach my $sources (@sources) {
   my $line;
 
   while (!eof(IN)) {
-    do { $line = <IN> } until ($line =~ m/^Directory: (.*)$/m);
-    my $pkg_dir = $1;
-    do { $line = <IN> } until ($line =~ m/^ [0-9a-f]{32} [0-9]+ (.+\.dsc)$/m);
-    my $dsc_file = "$pkg_dir/$1";
-    do { $line = <IN> } until ($line =~ m/^\s*$/m);
+    my $pkg_dir;
+    my $dsc_file;
+
+    do {
+      $line = <IN>;
+      if ($line =~ m/^Directory: (.*)$/) {
+        $pkg_dir = $1;
+      } elsif ($line =~ m/^ [0-9a-f]{32} [0-9]+ (.+\.dsc)$/) {
+        $dsc_file = $1;
+      }
+    } until (not defined($line) or $line =~ /^\s*$/);
+    $dsc_file = "$pkg_dir/$dsc_file";
 
     my @stat;
     # get timestamp...

-- 
Debian package checker


Reply to: