From 03e0e2d5c20361a23408273fbe063a81925e3824 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Wed, 9 Dec 2009 19:51:00 +0000 Subject: [PATCH] De-prefixify this script, since it doesn't look like it's going to work. Actually, this seems to be legacy that needs to be removed, since there is a python version (env-update) that calls the Portage internal implementation, which is of course entirely Prefix aware. svn path=/main/branches/prefix/; revision=14987 --- bin/env-update.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/bin/env-update.sh b/bin/env-update.sh index ac3d293e0..2a6a03201 100755 --- a/bin/env-update.sh +++ b/bin/env-update.sh @@ -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} -- 2.26.2