public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:prefix commit in: bin/ebuild-helpers/, pym/portage/package/ebuild/
@ 2011-12-02 19:18 Fabian Groffen
  0 siblings, 0 replies; only message in thread
From: Fabian Groffen @ 2011-12-02 19:18 UTC (permalink / raw
  To: gentoo-commits

commit:     693812e7d867826da51a677f43f5b8566ca5d393
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 19:15:49 2011 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 19:15:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=693812e7

_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 2b1b5b4..de52098 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 0ba1f96..f8e4a48 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,



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-02 19:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 19:18 [gentoo-commits] proj/portage:prefix commit in: bin/ebuild-helpers/, pym/portage/package/ebuild/ Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox