From: Zac Medico Date: Fri, 28 Mar 2008 04:55:41 +0000 (-0000) Subject: Bug #213698 - Make FEAUTURES=keepwork and keeptemp preserve ${T}/environment X-Git-Tag: v2.2_pre6~319 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6d068a8c3f86ac1550be649f6f958adeff8e3f23;p=portage.git Bug #213698 - Make FEAUTURES=keepwork and keeptemp preserve ${T}/environment since it may contain essential state. svn path=/main/trunk/; revision=9526 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index b522f8db0..33c6d12c3 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -650,11 +650,9 @@ dyn_unpack() { if [ "${newstuff}" == "yes" ]; then # We don't necessarily have privileges to do a full dyn_clean here. rm -rf "${WORKDIR}" - if [ -d "${T}" ] && ! hasq keeptemp ${FEATURES} ; then + if [ -d "${T}" ] && \ + ! hasq keeptemp $FEATURES && ! hasq keepwork $FEATURES ; then rm -rf "${T}" && mkdir "${T}" - else - [ -e "${T}/environment" ] && \ - mv "${T}/environment" "${T}/environment.keeptemp" fi fi if [ -e "${WORKDIR}" ]; then @@ -692,10 +690,8 @@ dyn_clean() { rm -rf "${PORTAGE_BUILDDIR}/image" "${PORTAGE_BUILDDIR}/homedir" - if ! hasq keeptemp $FEATURES; then + if ! hasq keeptemp $FEATURES && ! hasq keepwork $FEATURES ; then rm -rf "${T}" - else - [ -e "${T}/environment" ] && mv "${T}/environment" "${T}/environment.keeptemp" fi if ! hasq keepwork $FEATURES; then