The following commit has been merged in the master branch:
commit d8b365e28c7e025c77f007273c184a60ca8fb2dc
Author: Russ Allbery <[email protected]>
Date:   Tue Feb 3 19:44:57 2009 -0800

    Apply the list-binpkg fix to list-udebpkg as well

diff --git a/debian/changelog b/debian/changelog
index bf60609..a1ca793 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,7 +11,7 @@ lintian (2.2.3) UNRELEASED; urgency=low
       a wishlist bug against the package would be appropriate, which
       seems too strong.
 
-  * unpack/list-binpkg:
+  * unpack/list-{binpkg,udebpkg}:
     + [RA] Preserve the source_version field from the previous list when
       adding new packages, remove some dead code, and restructure for
       improved readability.  Thanks to Jordà Polo for the analysis.
diff --git a/unpack/list-udebpkg b/unpack/list-udebpkg
index e183271..42c99fe 100755
--- a/unpack/list-udebpkg
+++ b/unpack/list-udebpkg
@@ -35,7 +35,6 @@ if ($#ARGV == -1) {
 
 my $verbose = 0;
 my $output_file = undef;
-my $pkgdata = undef; # WTF?
 
 while (my $arg = shift) {
     if ($arg =~ s,^-,,o) {
@@ -140,12 +139,7 @@ while (!eof(IN)) {
     }
 
     if (($status eq 'new') or ($status eq 'changed')) {
-       if (defined $pkgdata) {
-           # avoid collecting the info twice
-           $data = $pkgdata;
-       } else {
-           $data = &safe_get_deb_info($deb_file);
-       }
+       $data = &safe_get_deb_info($deb_file);
        next if not defined $data;
        $pkg = $data->{'package'};
     }
@@ -156,10 +150,13 @@ while (!eof(IN)) {
        next;
     }
 
-    my $source_version = $data->{'version'};
-    if ($data->{'source'} =~ /^([-+\.\w]+)\s+\((.+)\)$/) {
-       $data->{'source'} = $1;
-       $source_version = $2;
+    unless (exists $data->{'source-version'}) {
+       if ($data->{'source'} =~ /^([-+\.\w]+)\s+\((.+)\)$/) {
+           $data->{'source'} = $1;
+           $data->{'source-version'} = $2;
+       } else {
+           $data->{'source-version'} = $data->{'version'};
+       }
     }
 
     # write entry to output file
@@ -167,7 +164,7 @@ while (!eof(IN)) {
                   $pkg,
                   $data->{'version'},
                   $data->{'source'},
-                  $source_version,
+                  $data->{'source-version'},
                   $deb_file,
                   $timestamp,
                   ),"\n";

-- 
Debian package checker


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

Reply via email to