The etc-update in portage-2.1.2-r9 ignores CONFIG_PROTECT_MASK the following patch fixes the problem --- /usr/lib/portage/bin/etc-update 2007-02-13 15:19:05.000000000 +0200 +++ cs-etc-update 2007-02-14 15:32:44.000000000 +0200 @@ -60,7 +60,8 @@ rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::") rfile=$(echo "${file/\/\///}" | sed -e "s:^.*/::") for mpath in ${CONFIG_PROTECT_MASK}; do - mpath="${ROOT}${path}" + mpath="${ROOT}${mpath}" + mpath=$(echo ${mpath/\/\///}) if [[ "${rpath}" == "${mpath}"* ]]; then mv ${rpath}/${rfile} ${rpath}/${rfile:10} break Reproducible: Always
Created attachment 110171 [details, diff] fixes the bug
Thanks, this is in svn r5969. Note that quotes are needed in mpath=$(echo "${mpath/\/\///}") for proper support of whitespace in paths (though etc-update doesn't currently have support whitespace in paths anyway).
Regarding support of white spaces in path, it looks like portage does not handle correctly whitespaces in general. I could not find a way how to specify white space for any of variables in /etc/make.conf or from command line, for example: ----------(1)---------- # portageq envvar CONFIG_PROTECT_MASK /etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo ----------------------- but -----------(2)--------- # env CONFIG_PROTECT_MASK="/zopa\ kaka" portageq envvar CONFIG_PROTECT_MASK /etc/env.d /etc/gconf /zopa\ kaka ----------------------- Why are the /etc/env.d/java/ /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo paths missing in (2) ? Now if i add CONFIG_PROTECT_MASK="/zopa\ kaka" to make.conf -----------(3)--------- # portageq envvar CONFIG_PROTECT_MASK /etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /zopa kaka ----------------------- In (3) there is no backslash for "/zopa\ kaka" path? The same behaviour for any variable in make.conf.
This likely is a result of the different parsers used for env variables (shell) and make.* files (python shlex module). I'd guess the latter interprets the backslash as escape character, so portage never gets to see it. And anyway, portage itself doesn't handle the backslash specially anyway, so an entry "/foo\ bar" would be treated as two separate entries "/foo\" and "bar". IOW: variables that use spaces as delimiters can't contain entries with spaces.
Well don't you think that for variables containing paths the ':' delimeter is much more appropriate rather than whitespace?
Probably, but implementing that change isn't trivial (usual compat issues).
This has been released in 2.1.2-r10.
related bug 150370 (this was the commit which caused this bug)