summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-25 06:26:29 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-25 06:26:29 +0000
commitb13416933b67988130b92f0a554e639cbf03e493 (patch)
tree2afead2349baa833f3c7f6b5463a168939cb06c6 /bin
parent8415bbc1e05e67f03ae9fa8155a2a7a0142ad136 (diff)
downloadportage-b13416933b67988130b92f0a554e639cbf03e493.tar.gz
portage-b13416933b67988130b92f0a554e639cbf03e493.tar.bz2
portage-b13416933b67988130b92f0a554e639cbf03e493.zip
Implement loading of environment.bz2 for the pkg_info() phase.
Since a temporary directory is required for processing of ${T}/environment, and we want a user who's not in the portage group to be able to run the pkg_info() phase, PORTAGE_TMPDIR is temporarily overridden with a directory created by mkdtemp. To make this work, doebuild() creates the tempdir and cleans it up in a finally block. svn path=/main/trunk/; revision=8649
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index bd01b4750..c28312ec6 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1601,7 +1601,8 @@ if hasq "depend" "${EBUILD_SH_ARGS}"; then
unset BIN_PATH BIN BODY FUNC_SRC
fi
-if hasq ${EBUILD_PHASE} setup prerm && [ ! -f "${T}/environment" ]; then
+if hasq ${EBUILD_PHASE} info prerm setup \
+ && [ ! -f "${T}/environment" ] ; then
bzip2 -dc "${EBUILD%/*}"/environment.bz2 > \
"${T}/environment" 2> /dev/null
if [ -s "${T}/environment" ] ; then