* [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install()
@ 2014-09-07 10:16 Michał Górny
2014-09-08 7:56 ` Alexander Berntsen
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Michał Górny @ 2014-09-07 10:16 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Michał Górny
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
---
bin/phase-functions.sh | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index f39a024..e80f16e 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
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install()
2014-09-07 10:16 [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install() Michał Górny
@ 2014-09-08 7:56 ` Alexander Berntsen
2014-09-10 0:29 ` Brian Dolbec
2014-09-10 6:56 ` Michał Górny
2014-09-12 7:17 ` Michał Górny
2 siblings, 1 reply; 5+ messages in thread
From: Alexander Berntsen @ 2014-09-08 7:56 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
LGTM.
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlQNYUsACgkQRtClrXBQc7Vu3gD/Xzrww5xS12eIRSJzgUpuX8y4
jR3D+EZXOg34rJfudv8A/AuqQuhwkmC9Wer+oR8uXDMAVV3aRqsuO3XfG7R91skG
=SLV8
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install()
2014-09-08 7:56 ` Alexander Berntsen
@ 2014-09-10 0:29 ` Brian Dolbec
0 siblings, 0 replies; 5+ messages in thread
From: Brian Dolbec @ 2014-09-10 0:29 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On Mon, 08 Sep 2014 09:56:59 +0200
Alexander Berntsen <bernalex@gentoo.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> LGTM.
> - --
> Alexander
> bernalex@gentoo.org
>
+1, commit
- --
Brian Dolbec <dolsen>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0
iQF8BAEBCgBmBQJUD5tbXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4Njg4RkQxQ0M3MUMxQzA0RUFFQTQyMzcy
MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfLUSUH/10BfJIIpZ2l7gmmS/yGHN37
VjHjGZSFlTOQ6Ov6D5tAgU7H25YxXT3JnQtGhSg99yMyMwOGHvSyaMZMOnWNgtuq
MuHDHio0MTua2Fe7GFc4jFFKUQySmmh/JeSubs/skPGNuB8NMT7T5inOkns45arA
DS5LtjfTjzk161BjuSEanH53RbUteDlN07f+ZTfmIHLiXPbcPRb2BOSUoZovVcTl
AK0cd9E6KvZyw9HDGXGEsQK51XFdmJpRHkJmmdsxe/As7I4lEvA3bu4G2mhn59rN
T5M2S1iF+KUcmqN4aoc1XRbN7qWQ01C6PBhslAygxdPKctg/R/yp6QfxlhYG8Hc=
=D7Dp
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install()
2014-09-07 10:16 [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install() Michał Górny
2014-09-08 7:56 ` Alexander Berntsen
@ 2014-09-10 6:56 ` Michał Górny
2014-09-12 7:17 ` Michał Górny
2 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2014-09-10 6:56 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
Dnia 2014-09-07, nie o godzinie 12:16 +0200, Michał Górny pisze:
> 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.
Pushed.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install()
2014-09-07 10:16 [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install() Michał Górny
2014-09-08 7:56 ` Alexander Berntsen
2014-09-10 6:56 ` Michał Górny
@ 2014-09-12 7:17 ` Michał Górny
2 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2014-09-12 7:17 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
Dnia 2014-09-07, o godz. 12:16:19
Michał Górny <mgorny@gentoo.org> napisał(a):
> 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
This one's committed.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-01 7:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-07 10:16 [gentoo-portage-dev] [PATCH] Run distcc-pump server throughout src_configure() to src_install() Michał Górny
2014-09-08 7:56 ` Alexander Berntsen
2014-09-10 0:29 ` Brian Dolbec
2014-09-10 6:56 ` Michał Górny
2014-09-12 7:17 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox