diff options
-rw-r--r-- | bin/phase-functions.sh | 14 |
1 files changed, 14 insertions, 0 deletions
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. |