[debhelper-devel] [debhelper] 01/01: dh: Optimise out --parallel when it is unnecessary
Niels Thykier
nthykier at moszumanska.debian.org
Wed Jul 1 19:54:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 2f12f2b27e50ca9318043f334fdde58bcc305b84
Author: Niels Thykier <niels at thykier.net>
Date: Wed Jul 1 21:54:00 2015 +0200
dh: Optimise out --parallel when it is unnecessary
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debian/changelog | 3 +++
dh | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e47d423..38f89e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ debhelper (9.20150629) UNRELEASED; urgency=medium
* d/changelog: Add missing entry for dh_md5sums/#786695 in
the 9.20150628 release.
* Makefile: Set LC_ALL=C when sorting.
+ * dh: Avoid passing --parallel to other debhelper commands
+ if it is the only option and "parallel" is not set (or
+ set to 1) in DEB_BUILD_OPTIONS.
-- Niels Thykier <niels at thykier.net> Sun, 28 Jun 2015 15:08:19 +0200
diff --git a/dh b/dh
index 93855c6..07facd0 100755
--- a/dh
+++ b/dh
@@ -575,6 +575,14 @@ while (@ARGV_orig) {
next;
}
elsif ($opt=~/^-/) {
+ if (not @options and $opt eq '--parallel') {
+ # Having an non-empty "@options" hurts performance quite a
+ # bit. At the same time, we want to promote the use of
+ # --parallel, so "tweak" the options a bit if there is no
+ # reason to include it.
+ my $max_parallel = get_buildoption('parallel') // 1;
+ next if $max_parallel == 1;
+ }
push @options, "-O".$opt;
$user_specified_options=1
unless $opt =~ /^--(parallel|buildsystem|sourcedirectory|builddirectory|)/;
--
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