aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-09-07 11:02:08 +0200
committerMichał Górny <mgorny@gentoo.org>2014-09-10 08:50:55 +0200
commitb7f0bcda782aee3451833ac1bc70c72ef669b19d (patch)
treed9d2c7cd0883a0234ab516378ae13e5074e08768 /bin
parentconfig.setcpv: fix bug #522362 (diff)
downloadportage-b7f0bcda782aee3451833ac1bc70c72ef669b19d.tar.gz
portage-b7f0bcda782aee3451833ac1bc70c72ef669b19d.tar.bz2
portage-b7f0bcda782aee3451833ac1bc70c72ef669b19d.zip
Run distcc-pump server throughout src_configure() to src_install()
Start distcc-pump server in all phases throughout src_configure() to src_install() rather than in src_compile() alone. Since each of those phases may involve some compilations, we should try to take full advantage of distcc in all of them. Moreover, this silences distcc warnings about being unable to connect to the server when compiling. Fixes: https://bugs.gentoo.org/show_bug.cgi?id=507482
Diffstat (limited to 'bin')
-rw-r--r--bin/phase-functions.sh26
1 files changed, 19 insertions, 7 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index f39a024a2..e80f16e7f 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -382,6 +382,19 @@ __dyn_prepare() {
trap - SIGINT SIGQUIT
}
+# @FUNCTION: __start_distcc
+# @DESCRIPTION:
+# Start distcc-pump if necessary.
+__start_distcc() {
+ if has distcc $FEATURES && has distcc-pump $FEATURES ; then
+ if [[ -z $INCLUDE_SERVER_PORT ]] || [[ ! -w $INCLUDE_SERVER_PORT ]] ; then
+ # adding distcc to PATH repeatedly results in fatal distcc recursion :)
+ eval $(pump --startup | grep -v PATH)
+ trap "pump --shutdown >/dev/null" EXIT
+ fi
+ fi
+}
+
__dyn_configure() {
if [[ -e $PORTAGE_BUILDDIR/.configured ]] ; then
@@ -401,6 +414,7 @@ __dyn_configure() {
fi
trap __abort_configure SIGINT SIGQUIT
+ __start_distcc
__ebuild_phase pre_src_configure
@@ -434,13 +448,7 @@ __dyn_compile() {
fi
trap __abort_compile SIGINT SIGQUIT
-
- if has distcc $FEATURES && has distcc-pump $FEATURES ; then
- if [[ -z $INCLUDE_SERVER_PORT ]] || [[ ! -w $INCLUDE_SERVER_PORT ]] ; then
- eval $(pump --startup)
- trap "pump --shutdown" EXIT
- fi
- fi
+ __start_distcc
__ebuild_phase pre_src_compile
@@ -464,6 +472,8 @@ __dyn_test() {
fi
trap "__abort_test" SIGINT SIGQUIT
+ __start_distcc
+
if [ -d "${S}" ]; then
cd "${S}"
else
@@ -509,6 +519,8 @@ __dyn_install() {
return 0
fi
trap "__abort_install" SIGINT SIGQUIT
+ __start_distcc
+
__ebuild_phase pre_src_install
if ___eapi_has_prefix_variables; then