1 |
commit: c9c2bcc619c6ff60e452205f94ae26d4afd44d82 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 3 15:34:08 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 3 15:36:23 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c9c2bcc6 |
7 |
|
8 |
Revert "_doebuild_path: Optimize PATH in ebuild environment." |
9 |
|
10 |
This reverts commit 7cb7196fe8aa668e76437a8a4500a7bcb9fd3c75. |
11 |
Since binary and installed packages have persistent PATH |
12 |
settings in environment.bz2, using realpath on PATH components |
13 |
can break binary and installed package phases if the symlink |
14 |
layout is somehow modified. Therefore, the implications of |
15 |
changes like this need to be considered very carefully. |
16 |
|
17 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
18 |
|
19 |
lib/portage/package/ebuild/doebuild.py | 10 +--------- |
20 |
1 file changed, 1 insertion(+), 9 deletions(-) |
21 |
|
22 |
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py |
23 |
index 66e294d51..584ff798b 100644 |
24 |
--- a/lib/portage/package/ebuild/doebuild.py |
25 |
+++ b/lib/portage/package/ebuild/doebuild.py |
26 |
@@ -5,7 +5,6 @@ from __future__ import unicode_literals |
27 |
|
28 |
__all__ = ['doebuild', 'doebuild_environment', 'spawn', 'spawnebuild'] |
29 |
|
30 |
-import collections |
31 |
import grp |
32 |
import gzip |
33 |
import errno |
34 |
@@ -255,14 +254,7 @@ def _doebuild_path(settings, eapi=None): |
35 |
path.append(x_abs) |
36 |
|
37 |
path.extend(rootpath) |
38 |
- |
39 |
- # Canonicalize paths and avoid duplicates when some directories |
40 |
- # (e.g. bin and sbin) are merged. |
41 |
- real_path = collections.OrderedDict() |
42 |
- for x in path: |
43 |
- real_path.setdefault(os.path.realpath(x), None) |
44 |
- |
45 |
- settings["PATH"] = ":".join(real_path) |
46 |
+ settings["PATH"] = ":".join(path) |
47 |
|
48 |
def doebuild_environment(myebuild, mydo, myroot=None, settings=None, |
49 |
debug=False, use_cache=None, db=None): |