[debhelper-devel] [debhelper] 01/01: makefile: disable parallel during make install
Niels Thykier
nthykier at moszumanska.debian.org
Sat May 6 13:07:11 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 8c2dabbd1eeeda4001295f2c1aeb7fb951142f6f
Author: Niels Thykier <niels at thykier.net>
Date: Fri May 5 18:58:06 2017 +0000
makefile: disable parallel during make install
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 ++++
debian/changelog | 3 +++
3 files changed, 13 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..4d7e4a2 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_buildpath('libtool')) {
+ $this->disable_parallel();
+ }
+
$this->make_first_existing_target(['install'],
"DESTDIR=$destdir",
"AM_UPDATE_INFO_DIR=no", @_);
diff --git a/debian/changelog b/debian/changelog
index 989fafa..da81e20 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -51,6 +51,9 @@ debhelper (10.3) UNRELEASED; urgency=medium
the module can no longer do anything.
* dh_installman.1: Improve the manpage to clarify the scope of
dh_installman and provide an examples. (Closes: LP: #184156)
+ * makefile.pm: Disable parallel installation if libtool is present to
+ avoid a race-condition in automake when using libtool.
+ (Closes: #861627)
[ Steven Chamberlain ]
* When cross-compiling for GNU/kFreeBSD host systems, set
--
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