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

[lintian] 01/01: reporting: Create a "last-error-by" field



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

nthykier pushed a commit to branch master
in repository lintian.

commit 7d76bae09b85a83095abd943007f13f41be7e9b6
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Feb 6 20:34:46 2018 +0000

    reporting: Create a "last-error-by" field
    
    This enables us to tell what version was the last known version to
    successfully process a package.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 commands/reporting-lintian-harness.pm | 2 +-
 commands/reporting-sync-state.pm      | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/commands/reporting-lintian-harness.pm b/commands/reporting-lintian-harness.pm
index a51e683..5beb492 100644
--- a/commands/reporting-lintian-harness.pm
+++ b/commands/reporting-lintian-harness.pm
@@ -428,7 +428,7 @@ sub process_worklist {
                 ++$group_data->{'processing-errors'};
                 # Set the "last-processed-by" flag so we can clear the
                 # error if there is a new version of lintian.
-                $group_data->{'last-processed-by'} = $LINTIAN_VERSION;
+                $group_data->{'last-error-by'} = $LINTIAN_VERSION;
             } else {
                 delete($group_data->{'processing-errors'});
             }
diff --git a/commands/reporting-sync-state.pm b/commands/reporting-sync-state.pm
index 3e50f05..0163233 100644
--- a/commands/reporting-sync-state.pm
+++ b/commands/reporting-sync-state.pm
@@ -300,12 +300,15 @@ sub cleanup_group_state {
             log_debug("Marking ${group_id} as out of date: In backlog")
               if $backlog->{$group_id};
         }
-        if (    exists($group_data->{'processing-errors'})
-            and exists($group_data->{'last-processed-by'})
-            and $group_data->{'last-processed-by'} ne $OPT{'desired-version'}){
+        if (
+            exists($group_data->{'processing-errors'})
+            and (not exists($group_data->{'last-error-by'})
+                or $group_data->{'last-error-by'} ne $OPT{'desired-version'})
+          ) {
             log_debug(
                 "Clearing error flag for ${group_id}: New version of lintian");
             delete($group_data->{'processing-errors'});
+            delete($group_data->{'last-error-by'});
         }
     }
 

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


Reply to: