Initialize PORTAGE_TMPDIR before using it. (trunk r7887)
authorZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 01:42:57 +0000 (01:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 01:42:57 +0000 (01:42 -0000)
svn path=/main/branches/2.1.2/; revision=7922

bin/etc-update

index 3ca5a52b1e36d5ed0339a5cae23f5605f4c0529f..242a3f7cf18ec497b04759e79f1dc389a60128a9 100755 (executable)
@@ -456,14 +456,14 @@ function die() {
 #
 scriptname=$(basename $0)
 
-TMP="${PORTAGE_TMPDIR}/etc-update-$$"
-trap die term
-
 type portageq > /dev/null || exit $?
 eval $(portageq envvar -v CONFIG_PROTECT \
        CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_TMPDIR ROOT USERLAND)
 export PORTAGE_TMPDIR
 
+TMP="${PORTAGE_TMPDIR}/etc-update-$$"
+trap die term
+
 [ -w ${PORTAGE_CONFIGROOT}etc ] || die "Need write access to ${PORTAGE_CONFIGROOT}etc" 1
 #echo $PORTAGE_TMPDIR
 #echo $CONFIG_PROTECT