etc-update: experimental prefix support
authorZac Medico <zmedico@gentoo.org>
Thu, 8 Dec 2011 18:03:00 +0000 (10:03 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 8 Dec 2011 18:03:00 +0000 (10:03 -0800)
bin/etc-update

index 2af04cc4ca0d6e9f169b5d86ef8bfb1c42c58417..5a7ba2a604992a42a8d049cdf6aa25ba95d48315 100755 (executable)
@@ -54,7 +54,7 @@ scan() {
        local my_basename
 
        for path in ${CONFIG_PROTECT} ; do
-               path="${ROOT}${path}"
+               path="${EROOT}${path}"
                # Do not traverse hidden directories such as .svn or .git.
                find_opts="-name .* -type d -prune -o -name ._cfg????_*"
                if [ ! -d "${path}" ]; then
@@ -74,7 +74,7 @@ scan() {
                        rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::")
                        rfile=$(echo "${file/\/\///}" | sed -e "s:^.*/::")
                        for mpath in ${CONFIG_PROTECT_MASK}; do
-                               mpath="${ROOT}${mpath}"
+                               mpath="${EROOT}${mpath}"
                                mpath=$(echo "${mpath/\/\///}")
                                if [[ "${rpath}" == "${mpath}"* ]]; then
                                        mv ${rpath}/${rfile} ${rpath}/${rfile:10}
@@ -537,7 +537,7 @@ ${SET_X} && set -x
 
 type portageq > /dev/null || exit $?
 eval $(portageq envvar -v CONFIG_PROTECT \
-       CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_TMPDIR ROOT USERLAND)
+       CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_TMPDIR EROOT USERLAND)
 export PORTAGE_TMPDIR
 
 TMP="${PORTAGE_TMPDIR}/etc-update-$$"