De-prefixify this script, since it doesn't look like it's going to work. Actually...
authorFabian Groffen <grobian@gentoo.org>
Wed, 9 Dec 2009 19:51:00 +0000 (19:51 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 9 Dec 2009 19:51:00 +0000 (19:51 -0000)
svn path=/main/branches/prefix/; revision=14987

bin/env-update.sh

index ac3d293e05dd99bdb5b7e19040f0c395e8c43862..2a6a032017c73b047dc2daf573ae1442ae7f6871 100755 (executable)
@@ -13,6 +13,11 @@ if [[ ${EUID} -ne 0 ]] ; then
        exit 1
 fi
 
+if [[ -n ${EPREFIX} ]] ; then
+       echo "$0: this shell script can't be used when a Prefix is in use, use the Python version of this script which calls the Portage internal implementation instead."
+       exit 1
+fi
+
 # Make sure our environment is sane
 if [[ ! -z "${MAKELINKS}" ]] ; then
        export MAKELINKS=0
@@ -22,7 +27,7 @@ fi
 export ROOT="${ROOT:=/}"
 [[ ${ROOT} == */ ]] || export ROOT="${ROOT}/"
 
-export ENVDIR="${EROOT}etc/env.d"
+export ENVDIR="${ROOT}etc/env.d"
 mkdir -p ${ENVDIR}
 chmod 755 ${ENVDIR}
 specials="
@@ -33,13 +38,13 @@ colon_separated="
        ADA_INCLUDE_PATH ADA_OBJECTS_PATH LDPATH PATH MANPATH ROOTPATH
        PRELINK_PATH PRELINK_PATH_MASK PYTHON_PATH"
 
-export LDSOCONF="${EROOT}etc/ld.so.conf"
+export LDSOCONF="${ROOT}etc/ld.so.conf"
 
-export PRELINKCONF="${EROOT}etc/prelink.conf"
+export PRELINKCONF="${ROOT}etc/prelink.conf"
 defaultprelinkpaths=":/bin:/sbin:/usr/bin:/usr/sbin:/lib:/usr/lib"
 
-export PROFILEENV="${EROOT}etc/profile.env"
-export CSHENV="${EROOT}etc/csh.env"
+export PROFILEENV="${ROOT}etc/profile.env"
+export CSHENV="${ROOT}etc/csh.env"
 
 # make sure we aren't tricked with previous 'my_envd_' variables
 unset $(set | grep '^my_envd_' | cut -d= -f1)
@@ -195,11 +200,11 @@ unset my_envd_LDPATH
 # RUN EXTERNAL PROGRAMS NOW
 ############################################
 
-echo ">>> Regenerating ${EROOT}etc/ld.so.cache..."
+echo ">>> Regenerating ${ROOT}etc/ld.so.cache..."
 if [[ ${MAKELINKS} -eq 0 ]] ; then
-       (cd / ; ${EPREFIX}/sbin/ldconfig -X -r ${EROOT} >& /dev/null)
+       (cd / ; ${EPREFIX}/sbin/ldconfig -X -r ${ROOT} >& /dev/null)
 else
-       (cd / ; ${EPREFIX}/sbin/ldconfig -r ${EROOT} >& /dev/null)
+       (cd / ; ${EPREFIX}/sbin/ldconfig -r ${ROOT} >& /dev/null)
 fi
 
 cat << EOF > ${PROFILEENV}