With a CONFIG_PROTECT="-*" setting, glibc will overwrite the system's
/etc/locale.gen file in src_install() with its default-empty one. In
pkg_postinst() it reads the empty /etc/locale.gen it just installed, and
as a result generates all locales.
So, allow CONFIG_PROTECT to be passed through unmolested so long as it
starts with "-*". This allows locales to be selectively enabled when
bootstrap.sh is run with CONFIG_PROTECT="-* /etc/locale.gen".
Signed-off-by: Matt Turner <mattst88@gentoo.org>
[[ -x /usr/bin/gcc-config ]] && GCC_CONFIG="/usr/bin/gcc-config"
# Allow portage to overwrite stuff
-export CONFIG_PROTECT="-*"
+[[ $CONFIG_PROTECT != "-*"* ]] && export CONFIG_PROTECT="-*"
# disable collision-protection
export FEATURES="${FEATURES} -collision-protect"