summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cnf/make.globals10
-rw-r--r--pym/portage/package/ebuild/config.py3
2 files changed, 8 insertions, 5 deletions
diff --git a/cnf/make.globals b/cnf/make.globals
index f7f178004..e1243fb08 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -30,13 +30,13 @@ ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
# Repository Paths
-PORTDIR=/usr/portage
-DISTDIR=/usr/portage/distfiles
-PKGDIR=/usr/portage/packages
-RPMDIR=/usr/portage/rpm
+PORTDIR=${EPREFIX}/usr/portage
+DISTDIR=${PORTDIR}/distfiles
+PKGDIR=${PORTDIR}/packages
+RPMDIR=${PORTDIR}/rpm
# Temporary build directory
-PORTAGE_TMPDIR=/var/tmp
+PORTAGE_TMPDIR=${EPREFIX}/var/tmp
# Fetching command (3 tries, passive ftp for firewall compatibility)
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index fb79e5ee1..959ecbedb 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -315,6 +315,9 @@ class config(object):
expand_map = {}
self._expand_map = expand_map
+ # Allow make.globals to set default paths relative to ${EPREFIX}.
+ expand_map["EPREFIX"] = eprefix
+
env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
expand=expand_map)