1 |
Ensure that DISTDIR is always defined to the path to the shadow |
2 |
directory. This ensures that PMS rules for consistent value are |
3 |
followed, and that no global scope calls should be able to access |
4 |
the distfile directory. This also ensures that global-scope assignments |
5 |
(e.g. in PATCHES) do not work around the shadow directory. |
6 |
|
7 |
Bug: https://bugs.gentoo.org/612972 |
8 |
--- |
9 |
pym/portage/package/ebuild/config.py | 11 ++++++++++- |
10 |
1 file changed, 10 insertions(+), 1 deletion(-) |
11 |
|
12 |
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py |
13 |
index d0225a311..5624e86d3 100644 |
14 |
--- a/pym/portage/package/ebuild/config.py |
15 |
+++ b/pym/portage/package/ebuild/config.py |
16 |
@@ -1,4 +1,4 @@ |
17 |
-# Copyright 2010-2016 Gentoo Foundation |
18 |
+# Copyright 2010-2018 Gentoo Foundation |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
|
21 |
from __future__ import unicode_literals |
22 |
@@ -2848,6 +2848,15 @@ class config(object): |
23 |
else: |
24 |
raise AssertionError("C locale did not pass the test!") |
25 |
|
26 |
+ try: |
27 |
+ builddir = mydict["PORTAGE_BUILDDIR"] |
28 |
+ distdir = mydict["DISTDIR"] |
29 |
+ except KeyError: |
30 |
+ pass |
31 |
+ else: |
32 |
+ mydict["PORTAGE_ACTUAL_DISTDIR"] = distdir |
33 |
+ mydict["DISTDIR"] = os.path.join(builddir, "distdir") |
34 |
+ |
35 |
return mydict |
36 |
|
37 |
def thirdpartymirrors(self): |
38 |
-- |
39 |
2.16.1 |