1 |
commit: 693812e7d867826da51a677f43f5b8566ca5d393 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 2 19:15:49 2011 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 2 19:15:49 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=693812e7 |
7 |
|
8 |
_doebuild_path: rely on DEFAULT_PATH and EXTRA_PATH |
9 |
|
10 |
Prefix uses DEFAULT_PATH (contains offset paths) and EXTRA_PATH |
11 |
(contains host paths), which are in particular during bootstrap quite |
12 |
important because then they contain extra paths foreign to the prefix |
13 |
(pointing to the temporary tools location). |
14 |
Hence, don't "compute" the path for Prefix, configure knows best. |
15 |
|
16 |
--- |
17 |
bin/ebuild-helpers/prepallinfo | 2 +- |
18 |
pym/portage/package/ebuild/doebuild.py | 19 +++++++------------ |
19 |
2 files changed, 8 insertions(+), 13 deletions(-) |
20 |
|
21 |
diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo |
22 |
index 2b1b5b4..de52098 100755 |
23 |
--- a/bin/ebuild-helpers/prepallinfo |
24 |
+++ b/bin/ebuild-helpers/prepallinfo |
25 |
@@ -2,7 +2,7 @@ |
26 |
# Copyright 1999-2011 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
|
29 |
-source "${PORTAGE_BIN_PATH:-@PORTAGE_BIN_PATH@}"/isolated-functions.sh |
30 |
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh |
31 |
|
32 |
# PREFIX LOCAL: always support ED |
33 |
#case "$EAPI" in 0|1|2) ED=${D} ;; esac |
34 |
|
35 |
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py |
36 |
index 0ba1f96..f8e4a48 100644 |
37 |
--- a/pym/portage/package/ebuild/doebuild.py |
38 |
+++ b/pym/portage/package/ebuild/doebuild.py |
39 |
@@ -127,25 +127,20 @@ def _doebuild_path(settings, eapi=None): |
40 |
eprefix = settings["EPREFIX"] |
41 |
prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x] |
42 |
rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x] |
43 |
- |
44 |
- prefixes = [] |
45 |
- if eprefix: |
46 |
- prefixes.append(eprefix) |
47 |
- prefixes.append("/") |
48 |
- |
49 |
- path = [] |
50 |
+ # PREFIX LOCAL: use DEFAULT_PATH and EXTRA_PATH from make.globals |
51 |
+ defaultpath = [x for x in settings.get("DEFAULT_PATH", "").split(":") if x] |
52 |
+ extrapath = [x for x in settings.get("EXTRA_PATH", "").split(":") if x] |
53 |
|
54 |
if eapi not in (None, "0", "1", "2", "3"): |
55 |
path.append(os.path.join(portage_bin_path, "ebuild-helpers", "4")) |
56 |
|
57 |
path.append(os.path.join(portage_bin_path, "ebuild-helpers")) |
58 |
path.extend(prerootpath) |
59 |
- |
60 |
- for prefix in prefixes: |
61 |
- for x in ("usr/local/sbin", "usr/local/bin", "usr/sbin", "usr/bin", "sbin", "bin"): |
62 |
- path.append(os.path.join(prefix, x)) |
63 |
- |
64 |
+ path.extend(defaultpath) |
65 |
path.extend(rootpath) |
66 |
+ path.extend(extrapath) |
67 |
+ # END PREFIX LOCAL |
68 |
+ |
69 |
settings["PATH"] = ":".join(path) |
70 |
|
71 |
def doebuild_environment(myebuild, mydo, myroot=None, settings=None, |