make.globals: use ${EPREFIX} for PORTDIR, etc...
authorZac Medico <zmedico@gentoo.org>
Thu, 8 Dec 2011 19:39:16 +0000 (11:39 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 8 Dec 2011 19:39:16 +0000 (11:39 -0800)
cnf/make.globals
pym/portage/package/ebuild/config.py

index f7f1780040505ca343eafc1e0f117980abb4ff9d..e1243fb08d0f21d513a5ca36af2fa8287b11eb84 100644 (file)
@@ -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}\""
index fb79e5ee1c2a239219457ae50478685eb4ca4825..959ecbedb085cbeaf91edf2a25541dca55aebe7e 100644 (file)
@@ -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)