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

[lintian] 04/05: L::Util: Make find_backlog penalitize packages with repeated errors



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 83455a675cb86cd99da43cb24c217c2ffd91557f
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Feb 4 10:17:29 2018 +0000

    L::Util: Make find_backlog penalitize packages with repeated errors
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Lintian/Util.pm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index b89396c..f2eafd0 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -1720,11 +1720,19 @@ gcc-5 + gcc-5-cross + gcc-6 + gcc-6-cross).
 
 sub find_backlog {
     my ($lintian_version, $state) = @_;
-    my (@backlog, %by_version);
+    my (@backlog, %by_version, @low_priority);
     for my $group_id (keys(%{$state->{'groups'}})) {
         my $last_version = '0';
         my $group_data = $state->{'groups'}{$group_id};
         my $is_out_of_date;
+        if (exists($group_data->{'processing-errors'})
+            and $group_data->{'processing-errors'} > 2) {
+            # To avoid possible "starvation", we will give lower priority
+            # to packages that repeatedly fail.  They will be retried as
+            # the backlog is cleared.
+            push(@low_priority, $group_id);
+            next;
+        }
         if (exists($group_data->{'out-of-date'})) {
             $is_out_of_date = $group_data->{'out-of-date'};
         }
@@ -1738,6 +1746,7 @@ sub find_backlog {
     for my $v (sort(versions_comparator keys(%by_version))) {
         push(@backlog, shuffle(@{$by_version{$v}}));
     }
+    push(@backlog, shuffle(@low_priority)) if @low_priority;
     return @backlog;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: