Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
Date: Sat, 24 Sep 2016 07:23:49
Message-Id: 1474699739.96338b8a2add3ab5f7f77fef41570807374771e3.zmedico@gentoo
1 commit: 96338b8a2add3ab5f7f77fef41570807374771e3
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 06:48:52 2016 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 24 06:48:59 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=96338b8a
7
8 doebuild_environment: disable ccache/distcc/icecc when necessary (bug 594982)
9
10 Fixes: a41c0f8b9081 ("doebuild: Support finding lib* for ccache/distcc/icecc masquerade dir")
11 X-Gentoo-Bug: 594982
12 X-Gentoo-Bug-URL: https://bugs.gentoo.org/594982
13
14 pym/portage/package/ebuild/doebuild.py | 9 +++++----
15 pym/portage/package/ebuild/prepare_build_dirs.py | 6 ------
16 2 files changed, 5 insertions(+), 10 deletions(-)
17
18 diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
19 index 26ecc75..52dbf8b 100644
20 --- a/pym/portage/package/ebuild/doebuild.py
21 +++ b/pym/portage/package/ebuild/doebuild.py
22 @@ -478,13 +478,13 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
23 possible_libexecdirs = (libdir, "lib", "libexec")
24 masquerades = []
25 if distcc:
26 - masquerades.append("distcc")
27 + masquerades.append(("distcc", "distcc"))
28 if icecream:
29 - masquerades.append("icecc")
30 + masquerades.append(("icecream", "icecc"))
31 if ccache:
32 - masquerades.append("ccache")
33 + masquerades.append(("ccache", "ccache"))
34
35 - for m in masquerades:
36 + for feature, m in masquerades:
37 for l in possible_libexecdirs:
38 p = os.path.join(os.sep, eprefix_lstrip,
39 "usr", l, m, "bin")
40 @@ -494,6 +494,7 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
41 else:
42 writemsg(("Warning: %s requested but no masquerade dir"
43 + "can be found in /usr/lib*/%s/bin\n") % (m, m))
44 + mysettings.features.remove(feature)
45
46 if 'MAKEOPTS' not in mysettings:
47 nproc = get_cpu_count()
48
49 diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
50 index 7fdac74..7e5249b 100644
51 --- a/pym/portage/package/ebuild/prepare_build_dirs.py
52 +++ b/pym/portage/package/ebuild/prepare_build_dirs.py
53 @@ -154,12 +154,10 @@ def _prepare_features_dirs(mysettings):
54
55 features_dirs = {
56 "ccache":{
57 - "path_dir": "%s/usr/%s/ccache/bin" % (EPREFIX, libdir),
58 "basedir_var":"CCACHE_DIR",
59 "default_dir":os.path.join(mysettings["PORTAGE_TMPDIR"], "ccache"),
60 "always_recurse":False},
61 "distcc":{
62 - "path_dir": "%s/usr/%s/distcc/bin" % (EPREFIX, libdir),
63 "basedir_var":"DISTCC_DIR",
64 "default_dir":os.path.join(mysettings["BUILD_PREFIX"], ".distcc"),
65 "subdirs":("lock", "state"),
66 @@ -180,10 +178,6 @@ def _prepare_features_dirs(mysettings):
67 basedir = kwargs["default_dir"]
68 mysettings[kwargs["basedir_var"]] = basedir
69 try:
70 - path_dir = kwargs["path_dir"]
71 - if not os.path.isdir(path_dir):
72 - raise DirectoryNotFound(path_dir)
73 -
74 mydirs = [mysettings[kwargs["basedir_var"]]]
75 if "subdirs" in kwargs:
76 for subdir in kwargs["subdirs"]: