Source: git
Version: 1:1.8.4~rc3-1
Severity: important

Anders Kaseorg wrote:

> Since both install-arch and install-indep run ‘$(MAKE) install’, running 
> them both concurrently creates race conditions where one job uses a file 
> written by the other.  Some particularly problematic files are 
> git-instaweb and GIT-BUILD-OPTIONS, which apparently get regenerated on 
> every build.
>
> Prevent these targets from running concurrently by adding an order-only 
> prerequisite.

Thanks.

Confusingly, order-only prerequisites are not actually order-only (see
6ae3b5f8 "debian/implicit: depend on install-arch or install-indep, not
both", 2013-03-25).  install-arch and install-indep install to different
temporary directories, and ideally they would not interfere with each
other.

I wonder what causes git-instaweb to confuse things.  Wouldn't
concurrent builds write to different files, with no bad effect?

Anyway, here's one approach to a fix.  Child makes would still run
with -j<num>, meaning tests still run in parallel, so hopefully it
wouldn't slow down builds by more than a factor of 2 or so.

Thoughts?

diff --git i/debian/changelog w/debian/changelog
index eb8d132..9d8d638 100644
--- i/debian/changelog
+++ w/debian/changelog
@@ -1,3 +1,10 @@
+git (1:1.8.4~rc3-1.1) unstable; urgency=low
+
+  * debian/rules: define .NOTPARALLEL to prevent "make" child
+    processes from stomping on each other.
+
+ -- Jonathan Nieder <[email protected]>  Mon, 19 Aug 2013 17:11:30 -0700
+
 git (1:1.8.4~rc3-1) unstable; urgency=low
 
   * new upstream release candidate.
diff --git i/debian/rules w/debian/rules
index 99275b4..4cdd764 100755
--- i/debian/rules
+++ w/debian/rules
@@ -359,4 +359,8 @@ binary-indep: install-indep $(patsubst 
%,%.deb,$(PKG_INDEP)) git-core.deb-DEBIAN
 .PHONY: install install-arch install-indep
 .PHONY: binary binary-arch binary-indep
 
+# Git's build system supports parallelism (-j) but does not handle
+# multiple concurrent "make" invocations.
+.NOTPARALLEL:
+
 include debian/implicit


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to