[debhelper-devel] [debhelper] 01/02: Dh_Lib: Fix rounding error causing off-by-one threads

Niels Thykier nthykier at moszumanska.debian.org
Sun Jun 25 18:21:25 UTC 2017


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

nthykier pushed a commit to branch master
in repository debhelper.

commit fd36179442354e335fd328e995f0ea06c3daba04
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Jun 25 18:18:29 2017 +0000

    Dh_Lib: Fix rounding error causing off-by-one threads
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm | 2 +-
 debian/changelog           | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index f8bac33..2403c8e 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -1646,7 +1646,7 @@ sub on_selected_pkgs_in_parallel {
 	my @pkgs = @{$pkgs_ref};
 	my %pids;
 	my $parallel = $MAX_PROCS;
-	my $count_per_proc = int(scalar(@pkgs) / $parallel);
+	my $count_per_proc = int( (scalar(@pkgs) + $parallel - 1)/ $parallel);
 	my $exit = 0;
 	if ($count_per_proc < 1) {
 		$count_per_proc = 1;
diff --git a/debian/changelog b/debian/changelog
index 8bd7c9e..d21b069 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debhelper (10.5.1) UNRELEASED; urgency=medium
+
+  * Dh_Lib.pm: Fix rounding error when computing how many processes
+    to use.  This rounding error could cause dh-tools to use one more
+    process than permitted by DEB_BUILD_OPTIONS.
+
+ -- Niels Thykier <niels at thykier.net>  Sun, 25 Jun 2017 18:02:30 +0000
+
 debhelper (10.5) unstable; urgency=medium
 
   * Upload to unstable.  (Closes: #865363)

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




More information about the debhelper-devel mailing list