[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 0ca56083c47778570015b8c4a3bfe580eb9e8e7d
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Dec 4 10:21:16 2011 +0100

    Fixed an issue where auto-clean would not see the true coll status
    
    Since 2.5.3 the processables may be instances of L::Lab::Entry
    themselves.  But in unpack the Lab would be unconditionally queried
    for a new entry even if the proc was an entry.
    
    This new entry would be used for recording coll statuses, but the
    original entry would be sent to auto-cleaning.  As the collection
    status for the original entry was not updated, auto-clean would assume
    there was nothing to do and left unpacked on the disk.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index b33f96d..1237743 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,8 @@ lintian (2.5.5) UNRELEASED; urgency=low
     + [NT] Allow -U to be given more than once.
     + [JW,NT] If using a temporary lab, print its location when
       using --verbose option.  (Closes: #650433)
+    + [NT] Fixed an issue where auto-clean would not see the real
+      status of some collections.
 
   * lib/Lintian/Collect/{Binary,Source}.pm:
     + [NT] Assume packages to be non-native when it cannot be
diff --git a/frontend/lintian b/frontend/lintian
index dee7fed..55c734e 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1445,9 +1445,17 @@ sub unpack_group {
         my $lpkg;
         my $base;
         my $info;
-        eval{
-            $lpkg = $LAB->get_package($proc);
-        };
+        # If $proc is an lab entry (i.e. we got it from the Lab already)
+        # just use it directly.
+        if ($proc->isa ('Lintian::Lab::Entry')) {
+            $lpkg = $proc;
+        } else {
+            # Else use the $proc to get the lab entry
+            eval{
+                $lpkg = $LAB->get_package($proc);
+            };
+        }
+
         if (!defined $lpkg) {
             my $err = '.';
             $err = ": $@" if defined $@;
@@ -1532,7 +1540,7 @@ sub unpack_group {
 
         if ($action eq 'check') {
             # We only need this if we are checking the package later
-            $proc->lab_pkg($lpkg);
+            $proc->lab_pkg($lpkg) unless $proc->isa ('Lintian::Lab::Entry');
         } else {
             # else we are done
             if (!$keep_lab) {

-- 
Debian package checker


Reply to: