cookutils rev 291
cook, cooker: multiple WANTED packages
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 27 13:08:41 2012 +0100 (2012-02-27) |
parents | db474cf35bbd |
children | 8a4aa7bd9842 |
files | cook cooker |
line diff
1.1 --- a/cook Sun Feb 26 19:04:26 2012 +0100 1.2 +++ b/cook Mon Feb 27 13:08:41 2012 +0100 1.3 @@ -170,9 +170,10 @@ 1.4 stuff=$pkgdir/stuff 1.5 install=$pkgdir/install 1.6 if [ "$WANTED" ]; then 1.7 - src=$WOK/$WANTED/source/$WANTED-$VERSION 1.8 - install=$WOK/$WANTED/install 1.9 - wanted_stuff=$WOK/$WANTED/stuff 1.10 + wanted=${WANTED%% *} 1.11 + src=$WOK/$wanted/source/$wanted-$VERSION 1.12 + install=$WOK/$wanted/install 1.13 + wanted_stuff=$WOK/$wanted/stuff 1.14 fi 1.15 # Kernel version is set from linux-api-headers since it is part of toolchain. 1.16 if [ -f "$INSTALLED/linux-api-headers/receipt" ]; then 1.17 @@ -1137,19 +1138,19 @@ 1.18 esac 1.19 1.20 # Check if wanted is built now so we have separate log files. 1.21 - if [ "$WANTED" ]; then 1.22 - if grep -q "^$WANTED$" $blocked; then 1.23 - echo "WANTED package is blocked: $WANTED" | tee $LOGS/$pkg.log 1.24 + for wanted in $WANTED ; then 1.25 + if grep -q "^$wanted$" $blocked; then 1.26 + echo "WANTED package is blocked: $wanted" | tee $LOGS/$pkg.log 1.27 echo "" && rm -f $command && exit 1 1.28 fi 1.29 - if grep -q "^$WANTED$" $broken; then 1.30 - echo "WANTED package is broken: $WANTED" | tee $LOGS/$pkg.log 1.31 + if grep -q "^$wanted$" $broken; then 1.32 + echo "WANTED package is broken: $wanted" | tee $LOGS/$pkg.log 1.33 echo "" && rm -f $command && exit 1 1.34 fi 1.35 - if [ ! -d "$WOK/$WANTED/install" ]; then 1.36 - cook "$WANTED" || exit 1 1.37 + if [ ! -d "$WOK/$wanted/install" ]; then 1.38 + cook "$wanted" || exit 1 1.39 fi 1.40 - fi 1.41 + done 1.42 1.43 # Cook and pack or exit on error and log everything. 1.44 cookit $@ 2>&1 | tee $LOGS/$pkg.log
2.1 --- a/cooker Sun Feb 26 19:04:26 2012 +0100 2.2 +++ b/cooker Mon Feb 27 13:08:41 2012 +0100 2.3 @@ -169,13 +169,13 @@ 2.4 do 2.5 unset WANTED 2.6 . $wok/$pkg/receipt 2.7 - if [ "$WANTED" ]; then 2.8 - echo "$pkg :: $WANTED" 2.9 - if grep -q ^${WANTED}$ $cooklist; then 2.10 + for wanted in $WANTED ; then 2.11 + echo "$pkg :: $wanted" 2.12 + if grep -q ^${wanted}$ $cooklist; then 2.13 sed -i -e "/^$pkg$/"d \ 2.14 - -e "/^$WANTED$/ a $pkg" $cooklist 2.15 + -e "/^$wanted$/ a $pkg" $cooklist 2.16 fi 2.17 - fi 2.18 + done 2.19 done 2.20 2.21 # Show ordered cooklist