[lintian] 01/01: c/r-lintian-harness: Add missing close and seek
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 2be2006187de40149765ab66b6dbfff871afd5e9
Author: Niels Thykier <niels@thykier.net>
Date: Sun Mar 6 20:21:27 2016 +0000
c/r-lintian-harness: Add missing close and seek
This has been working surprisingly well all things considered.
Nevertheless, it does seem prudent to fix these before they actually
cause issues.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
commands/reporting-lintian-harness.pm | 5 +++--
debian/changelog | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/commands/reporting-lintian-harness.pm b/commands/reporting-lintian-harness.pm
index d7b1250..58b2f8f 100644
--- a/commands/reporting-lintian-harness.pm
+++ b/commands/reporting-lintian-harness.pm
@@ -29,7 +29,7 @@ use autodie;
use constant BACKLOG_PROCESSING_TIME_LIMIT => 4 * 3600; # 4hours
-use Fcntl qw(F_GETFD F_SETFD FD_CLOEXEC);
+use Fcntl qw(F_GETFD F_SETFD FD_CLOEXEC SEEK_END);
use File::Basename qw(basename);
use File::Temp qw(tempfile);
use Getopt::Long();
@@ -337,6 +337,7 @@ sub process_worklist {
log_msg('Lintian finished successfully');
}
my $filter = generate_log_filter($state, \%processed);
+ seek($nfd, 0, SEEK_END);
update_lintian_log($filter, $nfd, $new_lintian_log);
log_msg('Updating harness state cache');
@@ -403,7 +404,7 @@ sub update_lintian_log {
}
}
close($input);
-
+ close($new_fd);
rename($tmp_path, $lintian_log);
};
if (my $err = $@) {
diff --git a/debian/changelog b/debian/changelog
index dc80d35..e3daf8f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ lintian (2.5.43) UNRELEASED; urgency=medium
XXX: generate tag summary with private/generate-tag-summary
+ * commands/reporting-lintian-harness.pm:
+ + [NT] Add missing close and seek to the end of the new
+ lintian log file before appending to it.
+
-- Niels Thykier <niels@thykier.net> Sat, 05 Mar 2016 20:58:52 +0000
lintian (2.5.42) unstable; urgency=medium
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: