# HG changeset patch # User Pascal Bellard # Date 1330344521 -3600 # Node ID c71b4f095cec039718a5c28df8e3d8a0ff736b97 # Parent db474cf35bbd9398abc34916cb9a63526793f5b2 cook, cooker: multiple WANTED packages diff -r db474cf35bbd -r c71b4f095cec cook --- a/cook Sun Feb 26 19:04:26 2012 +0100 +++ b/cook Mon Feb 27 13:08:41 2012 +0100 @@ -170,9 +170,10 @@ stuff=$pkgdir/stuff install=$pkgdir/install if [ "$WANTED" ]; then - src=$WOK/$WANTED/source/$WANTED-$VERSION - install=$WOK/$WANTED/install - wanted_stuff=$WOK/$WANTED/stuff + wanted=${WANTED%% *} + src=$WOK/$wanted/source/$wanted-$VERSION + install=$WOK/$wanted/install + wanted_stuff=$WOK/$wanted/stuff fi # Kernel version is set from linux-api-headers since it is part of toolchain. if [ -f "$INSTALLED/linux-api-headers/receipt" ]; then @@ -1137,19 +1138,19 @@ esac # Check if wanted is built now so we have separate log files. - if [ "$WANTED" ]; then - if grep -q "^$WANTED$" $blocked; then - echo "WANTED package is blocked: $WANTED" | tee $LOGS/$pkg.log + for wanted in $WANTED ; then + if grep -q "^$wanted$" $blocked; then + echo "WANTED package is blocked: $wanted" | tee $LOGS/$pkg.log echo "" && rm -f $command && exit 1 fi - if grep -q "^$WANTED$" $broken; then - echo "WANTED package is broken: $WANTED" | tee $LOGS/$pkg.log + if grep -q "^$wanted$" $broken; then + echo "WANTED package is broken: $wanted" | tee $LOGS/$pkg.log echo "" && rm -f $command && exit 1 fi - if [ ! -d "$WOK/$WANTED/install" ]; then - cook "$WANTED" || exit 1 + if [ ! -d "$WOK/$wanted/install" ]; then + cook "$wanted" || exit 1 fi - fi + done # Cook and pack or exit on error and log everything. cookit $@ 2>&1 | tee $LOGS/$pkg.log diff -r db474cf35bbd -r c71b4f095cec cooker --- a/cooker Sun Feb 26 19:04:26 2012 +0100 +++ b/cooker Mon Feb 27 13:08:41 2012 +0100 @@ -169,13 +169,13 @@ do unset WANTED . $wok/$pkg/receipt - if [ "$WANTED" ]; then - echo "$pkg :: $WANTED" - if grep -q ^${WANTED}$ $cooklist; then + for wanted in $WANTED ; then + echo "$pkg :: $wanted" + if grep -q ^${wanted}$ $cooklist; then sed -i -e "/^$pkg$/"d \ - -e "/^$WANTED$/ a $pkg" $cooklist + -e "/^$wanted$/ a $pkg" $cooklist fi - fi + done done # Show ordered cooklist