[SCM] Debian package checker branch, master, updated. 2.4.3-123-g6a61ae8
The following commit has been merged in the master branch:
commit 6a61ae81c7218a4468e33fee7b68ad77ad1e96fe
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jan 16 12:44:10 2011 +0100
Always reap jobs before exiting
In case of errors when proccessing the last package, Lintian could
exit while some jobs were still running. This caused issues if
these jobs (e.g. collections) were modifying the Lab, as END handler
would try to remove the Lab.
Note by default Lintian will patiently wait for the jobs to finish.
But if the END handler is triggered, while there are still jobs
running (e.g. we get a SIGINT), it will kill them forcefully.
* frontend/lintian:
+ [NT] Ensure that Lintian always reaps processes it started before
exiting. In some cases these jobs would attempt to modify the
lab while Lintian was trying to remove it. Thanks to
diff --git a/debian/changelog b/debian/changelog
index c92fc49..a4c834a 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -114,6 +114,12 @@ lintian (2.4.4) UNRELEASED; urgency=low
* debian/compat:
+ [NT] Bump debhelper comat to 7.
+ * frontend/lintian:
+ + [NT] Ensure that Lintian always reaps processes it started before
+ exiting. In some cases these jobs would attempt to modify the
+ lab while Lintian was trying to remove it. Thanks to
+ Andreas Beckmann for reporting this issue. (Closes: #610218)
+
* lib/Lintian/Check.pm:
+ [NT] Use Email::Valid to validate email addreses.
(Closes: #602655)
diff --git a/frontend/lintian b/frontend/lintian
index 42e6876..bbbd1de 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1556,6 +1556,16 @@ if ($action eq 'check' and not $no_override and not $show_overrides) {
# }}}
+
+# Wait for any remaining jobs - %running_jobs will usually be empty here
+# unless we had an issue examining the last package. We patiently wait
+# for them here; if the user cannot be bothered to wait, he/she can send
+# us a signal and the END handler will kill any remaining jobs.
+while (my ($coll, undef) = Lintian::Command::Simple::wait(\%running_jobs)) {
+ delete $running_jobs{$coll};
+}
+%running_jobs = ();
+
exit $exit_code;
# {{{ Some subroutines
@@ -1738,6 +1748,12 @@ sub END {
$SIG{'INT'} = 'DEFAULT';
$SIG{'QUIT'} = 'DEFAULT';
+ # Kill any remaining jobs.
+ if(%running_jobs) {
+ Lintian::Command::Simple::kill(\%running_jobs);
+ %running_jobs = ();
+ }
+
$LAB->delete() if $LAB and not $keep_lab;
}
--
Debian package checker
Reply to: