From: Zac Medico Date: Fri, 28 Mar 2008 13:07:53 +0000 (-0000) Subject: Bug #213698 - Make FEAUTURES=keepwork and keeptemp preserve ${T}/environment X-Git-Tag: v2.1.5~312 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9b6ab32fd773f59917688b75b2ea5da5db626602;p=portage.git Bug #213698 - Make FEAUTURES=keepwork and keeptemp preserve ${T}/environment since it may contain essential state. (trunk r9526) svn path=/main/branches/2.1.2/; revision=9578 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 395510fb6..fb2e2a3a5 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