aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-24 18:52:19 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-24 18:52:19 +0000
commit9acbcdff855022d1ee0a7c9af0b755e25613230c (patch)
treed6c051e3564edf7e9f8b78828315229ae8325fa9
parentf2f23009c69428d0905eff1de037424ac9c21364 (diff)
downloadpaludis-9acbcdff855022d1ee0a7c9af0b755e25613230c.tar.gz
paludis-9acbcdff855022d1ee0a7c9af0b755e25613230c.tar.xz
Catalyst unsets CONFIG_PROTECT. Work around this to avoid problems when upgrading Catalyst-generated packages.
-rw-r--r--ebuild/builtin_unmerge.bash8
1 files changed, 8 insertions, 0 deletions
diff --git a/ebuild/builtin_unmerge.bash b/ebuild/builtin_unmerge.bash
index d3b8456..5f56a3b 100644
--- a/ebuild/builtin_unmerge.bash
+++ b/ebuild/builtin_unmerge.bash
@@ -45,6 +45,7 @@ builtin_unmerge()
CONFIG_PROTECT_MASK="$(< ${dbdir}/CONFIG_PROTECT_MASK)"
fi
else
+ local old_CONFIG_PROTECT="${CONFIG_PROTECT:+${CONFIG_PROTECT} }/etc"
eval $(bzcat "${dbdir}/environment.bz2" | while read line; do
line=${line//\'}
if [[ ${line%%=*} == CONFIG_PROTECT ]]; then
@@ -53,6 +54,13 @@ builtin_unmerge()
echo "CONFIG_PROTECT_MASK='${line#*=}'"
fi
done)
+
+ # catalyst creates things with an empty CONFIG_PROTECT...
+ if [[ -z "${CONFIG_PROTECT// }" ]] ; then
+ ewarn "CONFIG_PROTECT from environment.bz2 is empty"
+ ewarn "Using a fallback of '${old_CONFIG_PROTECT}'"
+ CONFIG_PROTECT="${old_CONFIG_PROTECT}"
+ fi
fi
if [[ -n ${PALUDIS_EBUILD_OVERRIDE_CONFIG_PROTECT} ]]; then