From 693812e7d867826da51a677f43f5b8566ca5d393 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Fri, 2 Dec 2011 20:15:49 +0100 Subject: [PATCH] _doebuild_path: rely on DEFAULT_PATH and EXTRA_PATH Prefix uses DEFAULT_PATH (contains offset paths) and EXTRA_PATH (contains host paths), which are in particular during bootstrap quite important because then they contain extra paths foreign to the prefix (pointing to the temporary tools location). Hence, don't "compute" the path for Prefix, configure knows best. --- bin/ebuild-helpers/prepallinfo | 2 +- pym/portage/package/ebuild/doebuild.py | 19 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo index 2b1b5b48e..de52098bd 100755 --- a/bin/ebuild-helpers/prepallinfo +++ b/bin/ebuild-helpers/prepallinfo @@ -2,7 +2,7 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -source "${PORTAGE_BIN_PATH:-@PORTAGE_BIN_PATH@}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh # PREFIX LOCAL: always support ED #case "$EAPI" in 0|1|2) ED=${D} ;; esac diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 0ba1f9687..f8e4a4823 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -127,25 +127,20 @@ def _doebuild_path(settings, eapi=None): eprefix = settings["EPREFIX"] prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x] rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x] - - prefixes = [] - if eprefix: - prefixes.append(eprefix) - prefixes.append("/") - - path = [] + # PREFIX LOCAL: use DEFAULT_PATH and EXTRA_PATH from make.globals + defaultpath = [x for x in settings.get("DEFAULT_PATH", "").split(":") if x] + extrapath = [x for x in settings.get("EXTRA_PATH", "").split(":") if x] if eapi not in (None, "0", "1", "2", "3"): path.append(os.path.join(portage_bin_path, "ebuild-helpers", "4")) path.append(os.path.join(portage_bin_path, "ebuild-helpers")) path.extend(prerootpath) - - for prefix in prefixes: - for x in ("usr/local/sbin", "usr/local/bin", "usr/sbin", "usr/bin", "sbin", "bin"): - path.append(os.path.join(prefix, x)) - + path.extend(defaultpath) path.extend(rootpath) + path.extend(extrapath) + # END PREFIX LOCAL + settings["PATH"] = ":".join(path) def doebuild_environment(myebuild, mydo, myroot=None, settings=None, -- 2.26.2