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

[SCM] Debian package checker branch, master, updated. 2.5.9-30-g93aac5d



The following commit has been merged in the master branch:
commit 93aac5d6f0a4e15cc18169db968d098e46395ec4
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Jun 27 23:15:39 2012 +0200

    lintian: Fix race condition when reaping jobs
    
    In some cases, Lintian's selection of jobs caused it to skip some
    unpacking jobs.  If all the jobs currently in the queue would not add
    any new jobs, Lintian would assume it was done.  This turns out to be
    naïve.
    
    The patch fixes it by adding a check to ensure that there are no more
    jobs to be run.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/frontend/lintian b/frontend/lintian
index 88f95cf..b1c3b9e 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1509,7 +1509,20 @@ sub unpack_group {
         debug_msg(1, "Reap done jobs ... unpack group $groupid");
 
         # Stop when there are no running jobs and no new pending ones.
-        last unless %running_jobs or $newjobs;
+        unless (%running_jobs or $newjobs) {
+            # No more running jobs and no new jobs have become available...
+            # It is not quite sufficient, so ensure that all jobs have in
+            # fact been run.
+            my $done = 1;
+            foreach my $wlist (values %worklists) {
+                my $cmap = $wlist->{'collmap'};
+                if ($cmap->pending) {
+                    $done = 0;
+                    last;
+                }
+            }
+            last if $done;
+        }
     }
 
     foreach my $proc ($group->get_processables) {

-- 
Debian package checker


Reply to: