# HG changeset patch # User Antoine Bodin # Date 1296439689 -3600 # Node ID 0215ceb46bce2f596d27324059a96edeefc207d9 # Parent 116ec108ca537fcd4af494aaff2d4c0d15968ced Fix: block core toolchain packages efficiently and support block-list correctly diff -r 116ec108ca53 -r 0215ceb46bce tazwok --- a/tazwok Mon Jan 31 02:53:24 2011 +0100 +++ b/tazwok Mon Jan 31 03:08:09 2011 +0100 @@ -1556,7 +1556,17 @@ scan `cat $cooklist` --cooklist fi report end-step - [ -s $tmp/checked ] || return + + [ -s $tmp/checked ] || [ -s $tmp/cooklist ] || return + + # Core toolchain should not be cooked unless cook-toolchain is used. + if ! [ -f /etc/config.site.tmptoolchain ] ; then + for PACKAGE in $(scan gcc --look_for=all --with_args --with_wanted); do + grep -q ^$PACKAGE$ $PACKAGES_REPOSITORY/blocked || \ + echo $PACKAGE >> $PACKAGES_REPOSITORY/blocked + done + fi + if [ -s $PACKAGES_REPOSITORY/commit ]; then cd $PACKAGES_REPOSITORY for PACKAGE in $(cat commit); do @@ -1570,29 +1580,21 @@ fi [ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb [ "$plan_regen_cookorder" ] && sort_db - [ -s $PACKAGES_REPOSITORY/cooklist ] || return - - # Core toolchain should not be cooked unless cook-toolchain is used. - if ! [ -f /etc/config.site.tmptoolchain ] ; then - for PACKAGE in $(scan gcc --look_for=all --with_args --with_wanted); do - [ -f $tmp/cooklist ] && sed "/^$PACKAGE/d" -i $tmp/cooklist - [ -f $tmp/checked ] && sed "/^$PACKAGE/d" -i $tmp/checked - grep -q ^$PACKAGE$ $PACKAGES_REPOSITORY/blocked || \ - echo $PACKAGE >> $PACKAGES_REPOSITORY/blocked - done - fi sort_cooklist } sort_cooklist() { - if [ -f "$tmp/checked" ]; then rm -f $tmp/cooklist cat $tmp/checked | while read PACKAGE; do grep -q ^$PACKAGE$ $PACKAGES_REPOSITORY/cooklist && \ echo $PACKAGE >> $tmp/cooklist done + elif ! [ "$COMMAND" = gen-cooklist ]; then + cat $PACKAGES_REPOSITORY/blocked | while read PACKAGE; do + sed "/^$PACKAGE/d" -i $tmp/cooklist + done fi [ -s $tmp/cooklist ] || return