[debsums] 178/184: rdebsums: Exit with highest exit code of any of its child debsums processes exited
Axel Beckert
abe at deuxchevaux.org
Mon Mar 2 21:21:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository debsums.
commit f40c1665dafc1b5567847cbe3b8d945318c9808c
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Sat Feb 7 00:49:32 2015 +0100
rdebsums: Exit with highest exit code of any of its child debsums processes exited
Closes: #711560
---
debian/changelog | 2 ++
rdebsums | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 70c60a0..f314776 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,8 @@ debsums (2.1~dev) UNRELEASED; urgency=medium
(Closes: #737240)
* rdebsums:
+ Whitespace cleanup
+ + Exit with highest exit code of any of its child debsums processes
+ exited. (Closes: #711560)
-- Axel Beckert <abe at debian.org> Fri, 06 Feb 2015 23:50:20 +0100
diff --git a/rdebsums b/rdebsums
index cdd66f8..e3bf0c2 100755
--- a/rdebsums
+++ b/rdebsums
@@ -39,10 +39,18 @@ if(! (scalar @ARGV) || grep(/^--help/, @ARGV) ) {
my $pack = pop;
my $options = join(" ", @ARGV);
+my $overall_rc = 0;
for my $p (dependencies($pack, $others)) {
print "\nRunning debsums $options $p:\n";
- system "debsums $options $p";
+ my $rc = system "debsums $options $p";
+ $overall_rc = max($overall_rc, $rc);
+}
+
+if ($overall_rc > 0) {
+ exit $overall_rc >> 8;
+} else {
+ exit 0;
}
# Gets all the installed dependencies of a package, including
@@ -79,3 +87,8 @@ sub dependencies {
}
return (keys %{$ignore});
}
+
+sub max {
+ my ($a, $b) = @_;
+ return($a > $b ? $a : $b);
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/debsums.git
More information about the Pkg-perl-cvs-commits
mailing list