summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-10-23 18:15:15 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-10-23 18:15:15 +0000
commit448b2a915939c7168093825d6272fe7ecccaa25a (patch)
treeade77e2963652bcff7b4dd0d3dc94521b115c9c7 /scripts
parentInitial ebuild #7470 (diff)
downloadgentoo-2-448b2a915939c7168093825d6272fe7ecccaa25a.tar.gz
gentoo-2-448b2a915939c7168093825d6272fe7ecccaa25a.tar.bz2
gentoo-2-448b2a915939c7168093825d6272fe7ecccaa25a.zip
fix ncurses-5.3 issues; fix ctrl-c do not restore make.conf
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bootstrap.sh28
1 files changed, 25 insertions, 3 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index 9229fbcd16fc..7ddff92a9b3a 100755
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -14,6 +14,7 @@ else
#1.0 and later
PYTHON=/usr/bin/python
fi
+
#We really need to upgrade baselayout now that it's possible:
myBASELAYOUT=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-apps/baselayout | sed 's:^\*::'`
myPORTAGE=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-apps/portage | sed 's:^\*::'`
@@ -22,6 +23,8 @@ myBINUTILS=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-devel/binutil
myGCC=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-devel/gcc | sed 's:^\*::'`
myGLIBC=`cat ${MYPROFILEDIR}/packages | grep -v '^#' | grep sys-libs/glibc | sed 's:^\*::'`
myTEXINFO=`cat ${MYPROFILEDIR}/packages|grep -v '^#'|grep sys-apps/texinfo |sed 's:^\*::'`
+myZLIB=`cat ${MYPROFILEDIR}/packages|grep -v '^#'|grep sys-libs/zlib |sed 's:^\*::'`
+myNCURSES=`cat ${MYPROFILEDIR}/packages|grep -v '^#'|grep sys-libs/ncurses |sed 's:^\*::'`
echo "Using $myBASELAYOUT"
echo "Using $myPORTAGE"
@@ -30,15 +33,27 @@ echo "Using $myGCC"
echo "Using $myGETTEXT"
echo "Using $myGLIBC"
echo "Using $myTEXINFO"
+echo "Using $myZLIB"
+echo "Using $myNCURSES"
#This should not be set to get glibc to build properly. See bug #7652.
LD_LIBRARY_PATH=""
+#We do not want stray $TMP or $TMPDIR settings
+unset TMP TMPDIR
+
cleanup() {
- cp /etc/make.conf.build /etc/make.conf
+ if [ -f /etc/make.conf.build ]
+ then
+ mv -f /etc/make.conf.build /etc/make.conf
+ fi
exit $1
}
+#Trap ctrl-c and stuff. This should fix the users make.conf
+#not being restored.
+trap "cleanup" INT QUIT TSTP
+
#USE may be set from the environment so we back it up for later.
export ORIGUSE="`$PYTHON -c 'import portage; print portage.settings["USE"];'`"
export GENTOO_MIRRORS="`$PYTHON -c 'import portage; print portage.settings["GENTOO_MIRRORS"];'`"
@@ -69,15 +84,22 @@ then
export FTP_PROXY
fi
-export CONFIG_PROTECT="-*"
# disable autoclean, or it b0rks
export AUTOCLEAN="no"
+
+export CONFIG_PROTECT="-*"
#above allows portage to overwrite stuff
+
cd /usr/portage
emerge $myPORTAGE #separate, so that the next command uses the *new* emerge
emerge $myBASELAYOUT $myTEXINFO $myGETTEXT $myBINUTILS $myGCC || cleanup 1
#make.conf has been overwritten, so we explicitly export our original settings
export USE="$ORIGUSE bootstrap"
-emerge $myGLIBC $myBASELAYOUT $myTEXINFO $myGETTEXT $myBINUTILS $myGCC || cleanup 1
+emerge $myGLIBC $myBASELAYOUT $myTEXINFO $myGETTEXT $myZLIB $myBINUTILS $myGCC || cleanup 1
+#ncurses-5.3 and up also build c++ bindings, so we need to rebuild it
+export USE="$ORIGUSE"
+emerge $myNCURSES"
+
#restore original make.conf
cleanup 0
+