commit:     703616ef063672db9c9c868bbfcf091516ac6089
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  4 07:25:15 2016 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Fri Jun 10 01:47:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=703616ef

s/bootstrap-prefix.sh: remove EPREFIX/tmp after "emerge -e system".

  partially reverts 3a945696443b.

  1. A rerun of bootstrap script after "emerge -e system" failure
     should not go through stage1 again.
  2. For RAP binutils in stage3 is linked against zlib of stage2.

 scripts/bootstrap-prefix.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index b2dc5ec..0b9601b 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1515,12 +1515,6 @@ EOF
        # Switch to the proper portage.
        hash -r
 
-       # Get rid of the temporary tools.
-       if [[ -d ${ROOT}/tmp/var/tmp ]] ; then
-               rm -rf "${ROOT}"/tmp
-               mkdir "${ROOT}"/tmp
-       fi
-
        # Update the portage tree.
        treedate=$(date -f "${ROOT}"/usr/portage/metadata/timestamp +%s)
        nowdate=$(date +%s)
@@ -2168,7 +2162,13 @@ EOF
 
        hash -r  # tmp/* stuff is removed in stage3
 
-       if ! emerge -e system ; then
+       if emerge -e system ; then
+               # Now, after 'emerge -e system', we can get rid of the 
temporary tools.
+               if [[ -d ${EPREFIX}/tmp/var/tmp ]] ; then
+                       rm -Rf "${EPREFIX}"/tmp || return 1
+                       mkdir -p "${EPREFIX}"/tmp || return 1
+               fi
+       else
                # emerge -e system fail
                cat << EOF
 

Reply via email to