# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.463 2005/12/19 15:03:25 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.464 2005/12/19 15:23:50 wolf31o2 Exp $
+
+ 19 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org>
+ targets/stage1/stage1-chroot.sh, targets/stage1/stage1-controller.sh,
+ targets/stage1/stage1-preclean-chroot.sh:
+ Fixed up spacing/coding style on stage1. Also changed
+ gcc-config/binutils-config to be outside the chroot.
19 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org>
targets/netboot/netboot-chroot.sh, targets/netboot/netboot-combine.sh,
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.40 2005/12/09 19:03:07 wolf31o2 Exp $
-
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.41 2005/12/19 15:23:50 wolf31o2 Exp $
. /tmp/chroot-functions.sh
update_env_settings
-#setup_gcc
setup_myfeatures
setup_myemergeopts
-# setup our environment
+# Setup our environment
export clst_buildpkgs="$(/tmp/build.py)"
export STAGE1_USE="$(portageq envvar STAGE1_USE)"
export USE="-* build ${STAGE1_USE}"
export FEATURES="${clst_myfeatures} nodoc noman noinfo"
-## Sanity check profile
-if [ -z "${clst_buildpkgs}" ]
-then
- echo "Your profile seems to be broken."
- echo "Could not build a list of build packages."
- echo "Double check your /etc/make.profile link and the 'packages' files."
- exit 1
-fi
-
-
## Sanity check profile
if [ -z "${clst_buildpkgs}" ]
then
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-controller.sh,v 1.5 2005/12/02 17:05:56 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-controller.sh,v 1.6 2005/12/19 15:23:50 wolf31o2 Exp $
. ${clst_sharedir}/targets/support/functions.sh
case $1 in
enter)
;;
-
run)
cp ${clst_sharedir}/targets/stage1/build.py ${clst_chroot_path}/tmp
- # set up "ROOT in chroot" dir
+ # Setup "ROOT in chroot" dir
install -d ${clst_chroot_path}/${clst_root_path}/etc
- # set up make.conf and make.profile link in "ROOT in chroot":
+ # Setup make.conf and make.profile link in "ROOT in chroot":
copy_to_chroot ${clst_chroot_path}/etc/make.conf /${clst_root_path}/etc
- copy_to_chroot ${clst_chroot_path}/etc/make.profile /${clst_root_path}/etc
+ copy_to_chroot ${clst_chroot_path}/etc/make.profile \
+ /${clst_root_path}/etc
- # enter chroot, execute our build script
- exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh || exit 1
+ # Enter chroot, execute our build script
+ exec_in_chroot \
+ ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh \
+ || exit 1
;;
-
preclean)
+ # We run gcc-config here this way so it works on all arches.
+ if [ -x /usr/bin/gcc-config ]
+ then
+ mythang=$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* | head -n 1 )
+ if [ -z "${mythang}" ]
+ then
+ mythang=1
+ fi
+ ROOT=/tmp/stage1root gcc-config ${mythang}
+ fi
+ # We run binutils-config here so it works on all arches.
+ if [ -x /usr/bin/binutils-config ]
+ then
+ mythang=$( cd /etc/env.d/binutils; ls ${clst_CHOST}-* | head -n 1 )
+ if [ -z "${mythang}" ]
+ then
+ mythang=1
+ fi
+ ROOT=/tmp/stage1root binutils-config ${mythang}
+ fi
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh /tmp/stage1root || exit 1
-
;;
-
clean)
- # clean out man, info and doc files
+ # Clean out man, info and doc files
rm -rf usr/share/{man,doc,info}/*
- # zap all .pyc and .pyo files
+ # Zap all .pyc and .pyo files
find -iname "*.py[co]" -exec rm -f {} \;
- # cleanup all .a files except libgcc.a, *_nonshared.a and
+ # Cleanup all .a files except libgcc.a, *_nonshared.a and
# /usr/lib/portage/bin/*.a
- find -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a' | xargs rm -f
+ find -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' | \
+ grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a' | xargs \
+ rm -f
;;
-
*)
exit 1
;;
-
esac
exit $?
-
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-preclean-chroot.sh,v 1.7 2005/07/05 21:53:41 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-preclean-chroot.sh,v 1.8 2005/12/19 15:23:50 wolf31o2 Exp $
. /tmp/chroot-functions.sh
-# now, some finishing touches to initialize gcc-config....
-unset ROOT
+update_env_settings
-setup_gcc
-setup_binutils
-
-# stage1 is not going to have anything in zoneinfo, so save our Factory timezone
-if [ -d /usr/share/zoneinfo ] ; then
+# Stage1 is not going to have anything in zoneinfo, so save our Factory timezone
+if [ -d /usr/share/zoneinfo ]
+then
rm -f /etc/localtime
cp /usr/share/zoneinfo/Factory /etc/localtime
else
echo UTC > /etc/TZ
fi
-
-# this cleans out /var/db, but leaves behind files portage needs for removal
-#find /var/db/pkg -type f | grep -v '\(COUNTER\|CONTENTS\|ebuild\)' | xargs rm -f