[lintian] 01/01: c/reporting: Improve handling of packages with errors
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 51761a6f020cc117e8f060ac33b91f615fe2f646
Author: Niels Thykier <niels@thykier.net>
Date: Mon Feb 5 07:36:39 2018 +0000
c/reporting: Improve handling of packages with errors
Signed-off-by: Niels Thykier <niels@thykier.net>
---
commands/reporting-lintian-harness.pm | 11 ++++++++++-
commands/reporting-sync-state.pm | 7 +++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/commands/reporting-lintian-harness.pm b/commands/reporting-lintian-harness.pm
index 41931e5..b7aa42a 100644
--- a/commands/reporting-lintian-harness.pm
+++ b/commands/reporting-lintian-harness.pm
@@ -414,12 +414,21 @@ sub process_worklist {
next if not exists($state->{'groups'}{$group_id});
$group_data = $state->{'groups'}{$group_id};
$group_data->{'last-processed-by'} = $LINTIAN_VERSION;
+ delete($group_data->{'out-of-date'});
+ }
+ for my $group_id (sort(keys(%errors))) {
+ my $group_data;
+ # In theory, they can disappear - in practise, that requires
+ # an external call to (e.g.) dplint reporting-sync-state.
+ next if not exists($state->{'groups'}{$group_id});
if ($errors{$group_id}) {
++$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;
} else {
delete($group_data->{'processing-errors'});
}
- delete($group_data->{'out-of-date'});
}
save_state_cache($OPT{'state-dir'}, $state);
last if $exit_code;
diff --git a/commands/reporting-sync-state.pm b/commands/reporting-sync-state.pm
index 20f0c82..3e50f05 100644
--- a/commands/reporting-sync-state.pm
+++ b/commands/reporting-sync-state.pm
@@ -300,6 +300,13 @@ 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'}){
+ log_debug(
+ "Clearing error flag for ${group_id}: New version of lintian");
+ delete($group_data->{'processing-errors'});
+ }
}
if (not %{$members}) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: