tazwok rev 209
Fix: block core toolchain packages efficiently and support block-list correctly
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Mon Jan 31 03:08:09 2011 +0100 (2011-01-31) |
parents | 116ec108ca53 |
children | ee704af5304a |
files | tazwok |
line diff
1.1 --- a/tazwok Mon Jan 31 02:53:24 2011 +0100 1.2 +++ b/tazwok Mon Jan 31 03:08:09 2011 +0100 1.3 @@ -1556,7 +1556,17 @@ 1.4 scan `cat $cooklist` --cooklist 1.5 fi 1.6 report end-step 1.7 - [ -s $tmp/checked ] || return 1.8 + 1.9 + [ -s $tmp/checked ] || [ -s $tmp/cooklist ] || return 1.10 + 1.11 + # Core toolchain should not be cooked unless cook-toolchain is used. 1.12 + if ! [ -f /etc/config.site.tmptoolchain ] ; then 1.13 + for PACKAGE in $(scan gcc --look_for=all --with_args --with_wanted); do 1.14 + grep -q ^$PACKAGE$ $PACKAGES_REPOSITORY/blocked || \ 1.15 + echo $PACKAGE >> $PACKAGES_REPOSITORY/blocked 1.16 + done 1.17 + fi 1.18 + 1.19 if [ -s $PACKAGES_REPOSITORY/commit ]; then 1.20 cd $PACKAGES_REPOSITORY 1.21 for PACKAGE in $(cat commit); do 1.22 @@ -1570,29 +1580,21 @@ 1.23 fi 1.24 [ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb 1.25 [ "$plan_regen_cookorder" ] && sort_db 1.26 - [ -s $PACKAGES_REPOSITORY/cooklist ] || return 1.27 - 1.28 - # Core toolchain should not be cooked unless cook-toolchain is used. 1.29 - if ! [ -f /etc/config.site.tmptoolchain ] ; then 1.30 - for PACKAGE in $(scan gcc --look_for=all --with_args --with_wanted); do 1.31 - [ -f $tmp/cooklist ] && sed "/^$PACKAGE/d" -i $tmp/cooklist 1.32 - [ -f $tmp/checked ] && sed "/^$PACKAGE/d" -i $tmp/checked 1.33 - grep -q ^$PACKAGE$ $PACKAGES_REPOSITORY/blocked || \ 1.34 - echo $PACKAGE >> $PACKAGES_REPOSITORY/blocked 1.35 - done 1.36 - fi 1.37 sort_cooklist 1.38 } 1.39 1.40 sort_cooklist() 1.41 { 1.42 - 1.43 if [ -f "$tmp/checked" ]; then 1.44 rm -f $tmp/cooklist 1.45 cat $tmp/checked | while read PACKAGE; do 1.46 grep -q ^$PACKAGE$ $PACKAGES_REPOSITORY/cooklist && \ 1.47 echo $PACKAGE >> $tmp/cooklist 1.48 done 1.49 + elif ! [ "$COMMAND" = gen-cooklist ]; then 1.50 + cat $PACKAGES_REPOSITORY/blocked | while read PACKAGE; do 1.51 + sed "/^$PACKAGE/d" -i $tmp/cooklist 1.52 + done 1.53 fi 1.54 1.55 [ -s $tmp/cooklist ] || return