public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:prefix commit in: bin/ebuild-helpers/, pym/portage/package/ebuild/
Date: Fri,  2 Dec 2011 19:18:48 +0000 (UTC)	[thread overview]
Message-ID: <693812e7d867826da51a677f43f5b8566ca5d393.grobian@gentoo> (raw)

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,



                 reply	other threads:[~2011-12-02 19:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=693812e7d867826da51a677f43f5b8566ca5d393.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox