tazwok rev 550 4.3
Merge hotfixes from default branch
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Dec 10 03:42:32 2011 +0100 (2011-12-10) |
parents | fcc1dc4dd1af c7c055498940 |
children | adadf23b46bc |
files | chroot-scripts/cook-toolchain tazwok |
line diff
1.1 --- a/chroot-scripts/cook-toolchain Sat Nov 26 12:55:25 2011 +0000 1.2 +++ b/chroot-scripts/cook-toolchain Sat Dec 10 03:42:32 2011 +0100 1.3 @@ -88,7 +88,7 @@ 1.4 report open-bloc 1.5 prepare_package 1.6 report step "Running compilation rules" 1.7 - cook_cross_toolchain 1.8 + precook_tmp_toolchain 1.9 report end-step || exit 1 1.10 report close-bloc 1.11 report end-sublog
2.1 --- a/tazwok Sat Nov 26 12:55:25 2011 +0000 2.2 +++ b/tazwok Sat Dec 10 03:42:32 2011 +0100 2.3 @@ -303,7 +303,7 @@ 2.4 # Don't remove sources if a package uses src variable in its 2.5 # genpkg_rules: it maybe needs something inside. 2.6 for i in $PACKAGE $(look_for_rwanted); do 2.7 - sed -n '/^genpkg_rules\(\)/','/}/'p $WOK/$i/receipt | \ 2.8 + sed -n '/^genpkg_rules\(\)/','/^}/'p $WOK/$i/receipt | \ 2.9 fgrep -q '$src' && tazwok_warning "Sources will not be removed \ 2.10 because $i uses \$src in its receipt." && return 2.11 done 2.12 @@ -508,8 +508,7 @@ 2.13 2.14 remove_previous_package() 2.15 { 2.16 - [ "$prev_VERSION" ] || return 2.17 - if [ "$VERSION$EXTRAVERSION" != "$prev_VERSION" ]; then 2.18 + if [ "$prev_VERSION" ] && [ "$VERSION$EXTRAVERSION" != "$prev_VERSION" ]; then 2.19 rm -f $1/$PACKAGE-$prev_VERSION.tazpkg 2.20 fi 2.21 return 0 2.22 @@ -701,19 +700,22 @@ 2.23 if grep -q ^compile_rules $RECEIPT; then 2.24 echo "executing compile_rules" >> $LOG 2.25 report step "Executing compile_rules" 2.26 - cd $WOK/$PACKAGE 2.27 + if [ -d "$src" ]; then 2.28 + cd "$src" 2.29 + else 2.30 + cd $WOK/$PACKAGE 2.31 + fi 2.32 rm -f /tmp/config.site 2.33 ulimit -d unlimited 2.34 ulimit -m unlimited 2.35 2.36 - # Free some RAM by cleaning cache if option is enabled. 2.37 - freeram=$(free | fgrep '/+ buffers' | tr -s ' ' | cut -f 4 -d ' ') 2.38 + freeram=$(free -m | fgrep 'Mem:' | tr -s ' ' | cut -f 4 -d ' ') 2.39 2.40 - # Disable -pipe in CFLAGS/CXXFLAGS if less than 512Mb of free 2.41 + # Disable -pipe in CFLAGS/CXXFLAGS if less than 512MB of free 2.42 # RAM are available. 2.43 - if [ "$freeram" -lt 524288 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" -o \ 2.44 + if [ "$freeram" -lt 512 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" -o \ 2.45 "$CXXFLAGS" != "${CXXFLAGS/-pipe}" ]; then 2.46 - tazwok_warning "Disabling -pipe compile flag because only ${freeram}b of RAM is available." 2.47 + tazwok_warning "Disabling -pipe compile flag because of low memory: $freeram MB available." 2.48 CFLAGS="${CFLAGS/-pipe}" 2.49 CXXFLAGS="${CXXFLAGS/-pipe}" 2.50 fi