summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2005-11-20 03:08:57 +0000
committerNed Ludd <solar@gentoo.org>2005-11-20 03:08:57 +0000
commit74e3cda3c8777c1fb553f6cbe24fd134f6c9a52e (patch)
tree3f726d886215942d17e2906e073bd2b6ac79e37b /scripts
parentversion bump, stable on x86, clean out old ebuild (diff)
downloadgentoo-2-74e3cda3c8777c1fb553f6cbe24fd134f6c9a52e.tar.gz
gentoo-2-74e3cda3c8777c1fb553f6cbe24fd134f6c9a52e.tar.bz2
gentoo-2-74e3cda3c8777c1fb553f6cbe24fd134f6c9a52e.zip
no need to call portageq 15 times in a row while [[ (1/3) Configuring environment ]] when we can express the same thing in a single python statement that we can eval..
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bootstrap.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index fe9eeebe07b5..7f1b94513d68 100755
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.76 2005/08/15 18:35:51 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.77 2005/11/20 03:08:57 solar Exp $
# people who were here:
# (drobbins, 06 Jun 2003)
@@ -78,7 +78,7 @@ for opt in "$@" ; do
--resume|-r) STRAP_EMERGE_OPTS="${STRAP_EMERGE_OPTS} --usepkg --buildpkg";;
--verbose|-v) STRAP_EMERGE_OPTS="${STRAP_EMERGE_OPTS} -v"; V_ECHO=v_echo;;
--version)
- cvsver="$Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.76 2005/08/15 18:35:51 wolf31o2 Exp $"
+ cvsver="$Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.77 2005/11/20 03:08:57 solar Exp $"
cvsver=${cvsver##*,v }
einfo "Gentoo Linux bootstrap ${cvsver%%Exp*}"
exit 0
@@ -271,17 +271,13 @@ show_status 1 Configuring environment
# Get correct CFLAGS, CHOST, CXXFLAGS, MAKEOPTS since make.conf will be
# overwritten.
-ENV_EXPORTS="GENTOO_MIRRORS PORTDIR DISTDIR PKGDIR PORTAGE_TMPDIR
+export ENV_EXPORTS="GENTOO_MIRRORS PORTDIR DISTDIR PKGDIR PORTAGE_TMPDIR
CFLAGS CHOST CXXFLAGS MAKEOPTS ACCEPT_KEYWORDS PROXY HTTP_PROXY
FTP_PROXY FEATURES STAGE1_USE"
-for opt in ${ENV_EXPORTS} ; do
- val=$(portageq envvar "${opt}")
- if [[ -n ${val} ]] ; then
- einfo "${opt}='${val}'"
- export ${opt}="${val}"
- fi
-done
+eval $(python -c'import portage,os,string;print "\n".join(["export %s=\"%s\";[[ -z \"%s\" ]] || einfo %s=\"%s\";" % (k, portage.settings[k], portage.settings[k], k, portage.settings[k]) for k in os.getenv("ENV_EXPORTS").split()])')
+unset ENV_EXPORTS
+
echo -------------------------------------------------------------------------------
[[ -x /usr/sbin/gcc-config ]] && GCC_CONFIG="/usr/sbin/gcc-config"