#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.66 2004/12/23 05:39:33 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.67 2004/12/23 05:55:15 vapier Exp $
# people who were here:
# (drobbins, 06 Jun 2003)
echo &> /dev/null
}
fi
+show_status() {
+ local num=$1
+ shift
+ echo " [[ ($num/6) $* ]]"
+}
# Track progress of the bootstrap process to allow for
# semi-transparent resuming
unset STRAP_EMERGE_OPTS
STRAP_RUN=1
DEBUG=0
+GENTOO_VERS=2004.3 # Mostly for fluff ;)
for opt in "$@" ; do
case "${opt}" in
[[ -e /etc/profile ]] && source /etc/profile
-echo -e "\n${GOOD}Gentoo Linux${GENTOO_VERS}; ${BRACKET}http://www.gentoo.org/${NORMAL}"
+echo -e "\n${GOOD}Gentoo Linux ${GENTOO_VERS}; ${BRACKET}http://www.gentoo.org/${NORMAL}"
echo -e "Copyright 1999-2004 Gentoo Foundation; Distributed under the GPLv2"
if [[ ${STRAP_EMERGE_OPTS:0:2} = "-f" ]] ; then
echo "Fetching all bootstrap-related archives ..."
fi
fi
echo -------------------------------------------------------------------------------
+show_status 0 Locating packages
# This should not be set to get glibc to build properly. See bug #7652.
unset LD_LIBRARY_PATH
einfo "Using zlib : ${myZLIB}"
einfo "Using ncurses : ${myNCURSES}"
echo -------------------------------------------------------------------------------
-echo "Configuring environment ..."
+show_status 1 Configuring environment
# Get correct CFLAGS, CHOST, CXXFLAGS, MAKEOPTS since make.conf will be
# overwritten.
export FEATURES="${FEATURES} -collision-protect"
if [ ${BOOTSTRAP_STAGE} -le 1 ] ; then
+ show_status 2 Updating portage
USE="-* build bootstrap ${STAGE1_USE}" emerge ${STRAP_EMERGE_OPTS} ${myPORTAGE} || cleanup 1
echo -------------------------------------------------------------------------------
set_bootstrap_stage 2
# trying to use nptl, it may be needed to flush out any old headers
# before fully bootstrapping.
if [ ${BOOTSTRAP_STAGE} -le 2 ] ; then
+ show_status 3 Emerging headers/binutils
#emerge ${STRAP_EMERGE_OPTS} -C virtual/os-headers || cleanup 1
emerge ${STRAP_EMERGE_OPTS} ${myOS_HEADERS} ${myTEXINFO} ${myGETTEXT} ${myBINUTILS} || cleanup 1
echo -------------------------------------------------------------------------------
fi
if [ ${BOOTSTRAP_STAGE} -le 3 ] ; then
+ show_status 4 Emerging gcc
emerge ${STRAP_EMERGE_OPTS} ${myGCC} || cleanup 1
echo -------------------------------------------------------------------------------
set_bootstrap_stage 4
fi
if [ ${BOOTSTRAP_STAGE} -le 4 ] ; then
+ show_status 5 Emerging libc/baselayout
emerge ${STRAP_EMERGE_OPTS} ${myLIBC} ${myBASELAYOUT} ${myZLIB} || cleanup 1
echo -------------------------------------------------------------------------------
set_bootstrap_stage 5
# ncurses-5.3 and up also build c++ bindings, so we need to rebuild it
export USE="${ORIGUSE}"
if [ ${BOOTSTRAP_STAGE} -le 5 ] ; then
+ show_status 6 Re-Emerging C++ apps
emerge ${STRAP_EMERGE_OPTS} ${myNCURSES} || cleanup 1
echo -------------------------------------------------------------------------------
set_bootstrap_stage 6