From: Zac Medico Date: Thu, 8 Dec 2011 06:43:06 +0000 (-0800) Subject: Save EPREFIX in vdb when appropriate. X-Git-Tag: v2.2.0_alpha80~59 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5cd61be51c5d6c9e4714e65db77ad9c27b2fb9a7;p=portage.git Save EPREFIX in vdb when appropriate. The prefix branch already does this since it makes it easy to use chpathtool to adjust the content of a binary package so that it will work in a different EPREFIX from the one is was built for. --- diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 351ae9e1d..230291065 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -558,6 +558,20 @@ dyn_install() { fi echo "${USE}" > USE echo "${EAPI:-0}" > EAPI + + # Save EPREFIX, since it makes it easy to use chpathtool to + # adjust the content of a binary package so that it will + # work in a different EPREFIX from the one is was built for. + case "${EAPI:-0}" in + 0|1|2) + [[ " ${USE} " == *" prefix "* ]] && \ + [ -n "${EPREFIX}" ] && echo "${EPREFIX}" > EPREFIX + ;; + *) + [ -n "${EPREFIX}" ] && echo "${EPREFIX}" > EPREFIX + ;; + esac + set +f # local variables can leak into the saved environment.