1 |
In ebuild.sh, $T/environment is loaded for most phases, but it should |
2 |
always start with a fresh environment for pkg_setup. Therefore, skip |
3 |
environment loading for pkg_setup. |
4 |
|
5 |
This also requires a change in the config.environ method, in order |
6 |
to ensure that the calling environment is inherited by pkg_setup |
7 |
(even though $T/environment may exist). |
8 |
|
9 |
X-Gentoo-Bug: 528274 |
10 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528274 |
11 |
--- |
12 |
This updated patch adds the config.environ fix. |
13 |
|
14 |
bin/ebuild.sh | 2 +- |
15 |
pym/portage/package/ebuild/config.py | 2 +- |
16 |
2 files changed, 2 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/bin/ebuild.sh b/bin/ebuild.sh |
19 |
index 658884a..1cd029e 100755 |
20 |
--- a/bin/ebuild.sh |
21 |
+++ b/bin/ebuild.sh |
22 |
@@ -501,7 +501,7 @@ fi |
23 |
export EBUILD_MASTER_PID=${BASHPID:-$(__bashpid)} |
24 |
trap 'exit 1' SIGTERM |
25 |
|
26 |
-if ! has "$EBUILD_PHASE" clean cleanrm depend && \ |
27 |
+if ! has "$EBUILD_PHASE" clean cleanrm depend setup && \ |
28 |
[ -f "${T}"/environment ] ; then |
29 |
# The environment may have been extracted from environment.bz2 or |
30 |
# may have come from another version of ebuild.sh or something. |
31 |
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py |
32 |
index 2ceb122..5b706f2 100644 |
33 |
--- a/pym/portage/package/ebuild/config.py |
34 |
+++ b/pym/portage/package/ebuild/config.py |
35 |
@@ -2655,7 +2655,7 @@ class config(object): |
36 |
phase = self.get('EBUILD_PHASE') |
37 |
filter_calling_env = False |
38 |
if self.mycpv is not None and \ |
39 |
- phase not in ('clean', 'cleanrm', 'depend', 'fetch'): |
40 |
+ phase not in ('clean', 'cleanrm', 'depend', 'fetch', 'setup'): |
41 |
temp_dir = self.get('T') |
42 |
if temp_dir is not None and \ |
43 |
os.path.exists(os.path.join(temp_dir, 'environment')): |
44 |
-- |
45 |
2.0.4 |