Fixed up spacing/coding style on stage1. Also changed gcc-config/binutils-config...
authorChris Gianelloni <wolf31o2@gentoo.org>
Mon, 19 Dec 2005 15:23:50 +0000 (15:23 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Mon, 19 Dec 2005 15:23:50 +0000 (15:23 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@976 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/stage1/stage1-chroot.sh
targets/stage1/stage1-controller.sh
targets/stage1/stage1-preclean-chroot.sh

index 664ce4e981918d282f445f18ce416bee5e961b0f..9084ff1e991beb032e614a9c0429446b96b1c7a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 # 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,
index 26e92507827340c095129990fd1c1b22b7d803e7..afce9ac7a385eb835c6d4103c8b566a8548810f8 100755 (executable)
@@ -1,33 +1,21 @@
 #!/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
index 51eecf9907953218b7b7dd4a3b01af1d222eac9c..739f56fd7d8ec8e7bc291376650e44d9c2ce4dc8 100755 (executable)
@@ -1,47 +1,65 @@
 #!/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 $?
-
index 746586d0732b8d248e1a5fa22cc30afd199df393..ca16d1be2ae1cb2b56bef5678543ae3554f095c0 100755 (executable)
@@ -1,23 +1,17 @@
 #!/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