A quick effort to add support to etc-update for when $ROOT and $PORTAGE_CONFIGROOT are set.
Created attachment 99036 [details, diff] Add support to etc-update for ROOT and PORTAGE_CONFIGROOT
The patch should have ""s around the added ${...}s. Otherwise there will be problems if $ROOT or $PORTAGE_CONFIGROOT contain spaces.
Thanks, your patch is in svn r4645. I didn't bother to quote them because there's other path handling that's already unsafe for spaces. We can fix that in a separate patch I guess.
This has been release in 2.1.2_pre2-r8.
This update causes double slash being inserted in this place: + path="${ROOT}/${path}" So CONFIG_PROTECT_MASK is being ignored after that since it does not compare //<path> to /<path>
(In reply to comment #5) > This update causes double slash being inserted in this place: > + path="${ROOT}/${path}" I think that's been fixed since bug 166837.
Zac, you are correct, it is fixed in 166837. But do you agree that fix provided is a correct fix to the problem? But in my opinion, this bug fixes consequences, and does not fix the real (software design) problem. Much better to use a correct variable from beginning, vs. patching it every time you need to compare. Something like this would work much better: *** etc-update.orig 2007-04-29 13:00:27.000000000 +0300 --- etc-update 2007-04-29 13:01:10.000000000 +0300 *************** *** 44,49 **** --- 44,50 ---- for path in ${CONFIG_PROTECT} ; do path="${ROOT}${path}" + path=$(echo $path|sed -e "s://:/:g") find_opts="-iname ._cfg????_*" if [ ! -d "${path}" ]; then [ ! -f "${path}" ] && continue So, this removes problem, and makes $path variable availave for comparision and any other action not only in CONFIG_PROTECT_MASK block, but anywhere in the code. So, we actually had 1 problem before, now we have a problem & a half-fix for the problem.