cookutils diff cook @ 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 0d08acc6d3c3
children 8a4aa7bd9842
line diff
     1.1 --- a/cook	Thu Feb 16 23:37:46 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