From 5cd61be51c5d6c9e4714e65db77ad9c27b2fb9a7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 7 Dec 2011 22:43:06 -0800 Subject: 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. --- bin/phase-functions.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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. -- cgit v1.2.3-1-g7c22