tazwok rev 441
Fix + improvements into cook-toolchain script
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Mon Mar 14 23:37:27 2011 +0100 (2011-03-14) |
parents | 9c6dcc616fe9 |
children | d2189908cd1b |
files | chroot-scripts/cook-toolchain |
line diff
1.1 --- a/chroot-scripts/cook-toolchain Mon Mar 14 17:23:38 2011 +0100 1.2 +++ b/chroot-scripts/cook-toolchain Mon Mar 14 23:37:27 2011 +0100 1.3 @@ -18,13 +18,21 @@ 1.4 report step "Cooking temporary toolchain" 1.5 report open-bloc 1.6 1.7 -report step "Initializing tools & environment" 1.8 +report step "Configuring repositories" 1.9 +# Incoming packages as the only source for packages. 1.10 +rm -r /var/lib/tazpkg/undigest 1.11 +tazpkg setup-mirror $SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}/packages-incoming 1.12 +tazpkg recharge 1.13 1.14 +report step "Refreshing SliTaz tools" 1.15 +report open-bloc 1.16 # These four packages will be needed later. 1.17 for p in libtaz tazwok slitaz-base-files tazpkg; do 1.18 tazwok cook $p 1.19 done 1.20 +report close-bloc 1.21 1.22 +report step "Setting up environnement" 1.23 set +h 1.24 umask 022 1.25 PS1='\u:\w\$ ' 1.26 @@ -42,11 +50,17 @@ 1.27 export LANG LC_ALL PATH PS1 MAKEFLAGS CONFIG_SITE 1.28 unset CC CXX CPP CFLAGS CXXFLAGS LD_LIBRARY_PATH LD_PRELOAD DESTDIR 1.29 1.30 +LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION 1.31 +[ "$undigest" ] && LOCAL_REPOSITORY=$SLITAZ_DIR/$undigest 1.32 +WOK=$LOCAL_REPOSITORY/wok 1.33 + 1.34 # Create the dir for the temporary toolchain and link in root of host 1.35 # system. 1.36 -[ -d /tools ] && rm -r /tools 1.37 +rm -rf /tools 1.38 mkdir /tools 1.39 1.40 +report end-step 1.41 + 1.42 # Use some tweaked code from tazwok. 1.43 prepare_package() 1.44 { 1.45 @@ -58,11 +72,6 @@ 1.46 src=$WOK/$PACKAGE/$PACKAGE-$VERSION 1.47 cd $WOK/$PACKAGE 1.48 } 1.49 -LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION 1.50 -[ "$undigest" ] && LOCAL_REPOSITORY=$SLITAZ_DIR/$undigest 1.51 -WOK=$LOCAL_REPOSITORY/wok 1.52 - 1.53 -report end-step 1.54 1.55 # Binutils and gcc need to be compiled twice. 1.56 for PACKAGE in binutils gcc; do 1.57 @@ -162,11 +171,6 @@ 1.58 # more robust & stable; in some cases it solves dependency 1.59 # loops. 1.60 1.61 -# Incoming packages as the only source for packages. 1.62 -rm -r /var/lib/tazpkg/undigest 1.63 -tazpkg setup-mirror $SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}/packages-incoming 1.64 -tazpkg recharge 1.65 - 1.66 # Get toolchain cooklist. 1.67 tazwok gen-cooklist ${undigest:+--undigest=$undigest} > /tmp/toolchain.list 1.68 1.69 @@ -175,6 +179,6 @@ 1.70 # of the presence of new executables even if they're first in 1.71 # $PATH. 1.72 1.73 -cat /tmp/cooklist | while read PACKAGE; do 1.74 +cat /tmp/toolchain.list | while read PACKAGE; do 1.75 tazwok cook $PACKAGE || exit 1 1.76 done