[debhelper-devel] [Git][debian/debhelper][master] makefile.pm: Skip -O when STDOUT it a TTY

Niels Thykier gitlab at salsa.debian.org
Sat Feb 24 16:00:23 UTC 2018


Niels Thykier pushed to branch master at Debian / debhelper


Commits:
9108d9b9 by Niels Thykier at 2018-02-24T15:58:35+00:00
makefile.pm: Skip -O when STDOUT it a TTY

Signed-off-by: Niels Thykier <niels at thykier.net>

- - - - -


2 changed files:

- debian/changelog
- lib/Debian/Debhelper/Buildsystem/makefile.pm


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,8 +17,8 @@ debhelper (11.1.5) UNRELEASED; urgency=medium
     dh_testroot outside the source root (as we may need to check
     the compat level in a future version of debhelper).
   * makefile.pm: Synchronize output from make (via -O) when
-    make runs in parallel.  Thanks to Goswin von Brederlow for
-    the suggestion.  (Closes: #768791)
+    make runs in parallel except when STDOUT is a TTY.  Thanks
+    to Goswin von Brederlow for the suggestion.  (Closes: #768791)
   * dh_gencontrol: Avoid uninitialized value warning when there
     are no build-ids (e.g. because the builder disabled the
     dbgsym building via DEB_BUILD_OPTIONS).  This regression


=====================================
lib/Debian/Debhelper/Buildsystem/makefile.pm
=====================================
--- a/lib/Debian/Debhelper/Buildsystem/makefile.pm
+++ b/lib/Debian/Debhelper/Buildsystem/makefile.pm
@@ -84,8 +84,10 @@ sub do_make {
 	if ($parallel == 0 or $parallel > 1) {
 		# We have to use the empty string for "unlimited"
 		$parallel = '' if $parallel == 0;
-		# -O is for synchronizing the output.
-		unshift(@_, "-j${parallel}", '-O');
+		# -O is for synchronizing the output; only if STDOUT
+		# is not a TTY
+		unshift(@_, '-O') if not -t STDOUT;
+		unshift(@_, "-j${parallel}");
 	} else {
 		unshift(@_, '-j1');
 	}



View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/9108d9b9d70d06e4b89f67255230972b5625c0ec

---
View it on GitLab: https://salsa.debian.org/debian/debhelper/commit/9108d9b9d70d06e4b89f67255230972b5625c0ec
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20180224/8fb7b2bd/attachment-0001.html>


More information about the debhelper-devel mailing list