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

[lintian] 05/14: Make find_backlog check out-of-date flag in the state cache



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

nthykier pushed a commit to branch master
in repository lintian.

commit 15cdec6f831bd2a5293ea9a5db66c9ab5902b4bc
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Jan 30 23:28:44 2015 +0100

    Make find_backlog check out-of-date flag in the state cache
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Lintian/Util.pm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index 0c895b2..077d8e8 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -1601,13 +1601,19 @@ processed the package.
 sub find_backlog {
     my ($lintian_version, $state) = @_;
     my (@list, @sorted);
-    for my $group_id (keys(%{$state})) {
+    for my $group_id (keys(%{$state->{'groups'}})) {
         my $last_version = '0';
-        if (exists($state->{$group_id}{'last-processed-by'})) {
-            $last_version = $state->{$group_id}{'last-processed-by'};
+        my $group_data = $state->{'groups'}{$group_id};
+        my $is_out_of_date;
+        if (exists($group_data->{'out-of-date'})) {
+            $is_out_of_date = $group_data->{'out-of-date'};
         }
-        push(@list, [$group_id, $last_version])
+        if (exists($group_data->{'last-processed-by'})) {
+            $last_version = $group_data->{'last-processed-by'};
+        }
+        $is_out_of_date = 1
           if not versions_equal($last_version, $lintian_version);
+        push(@list, [$group_id, $last_version]) if $is_out_of_date;
     }
     @sorted = map { $_->[0] }
       sort { versions_comparator($a->[1], $b->[1]) || $a->[0] cmp $b->[0] }

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


Reply to: