[debhelper-devel] [debhelper] 01/01: makefile: disable parallel during make install (wip)

Niels Thykier nthykier at moszumanska.debian.org
Fri May 5 19:01:36 UTC 2017


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

nthykier pushed a commit to branch libtool-make-install-race
in repository debhelper.

commit 5e300f7a49a42e0208f02883f1133a805d02f56c
Author: Niels Thykier <niels at thykier.net>
Date:   Fri May 5 18:58:06 2017 +0000

    makefile: disable parallel during make install (wip)
    
    Apparently, libtool+automake has a race condition in some cases, where
    automake will try to relink a binary about be installed before the
    library is installed.  The bug is many years old and apparently not a
    priority, so work around it in debhelper.
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Buildsystem.pm          | 6 ++++++
 Debian/Debhelper/Buildsystem/makefile.pm | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/Debian/Debhelper/Buildsystem.pm b/Debian/Debhelper/Buildsystem.pm
index 2fbb476..2fdf97a 100644
--- a/Debian/Debhelper/Buildsystem.pm
+++ b/Debian/Debhelper/Buildsystem.pm
@@ -259,6 +259,12 @@ sub get_parallel {
 	return $this->{parallel};
 }
 
+# This parallel support for the given step
+sub disable_parallel {
+	my ($this) = @_;
+	$this->{parallel} = 1;
+}
+
 # When given a relative path to the build directory, converts it
 # to the path that is relative to the source directory. If $path is
 # not given, returns a path to the build directory that is relative
diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm
index f66b9e0..90320f5 100644
--- a/Debian/Debhelper/Buildsystem/makefile.pm
+++ b/Debian/Debhelper/Buildsystem/makefile.pm
@@ -159,6 +159,10 @@ sub install {
 	if (ref($this) eq 'Debian::Debhelper::Buildsystem::makefile' and not compat(10)) {
 		unshift @_, "INSTALL=install --strip-program=true";
 	}
+	if ( -f $this->get_sourcepath('libtool.sh')) {
+		$this->disable_parallel();
+	}
+
 	$this->make_first_existing_target(['install'],
 		"DESTDIR=$destdir",
 		"AM_UPDATE_INFO_DIR=no", @_);

-- 
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