cookutils rev 678

Try to spped up arch DB build
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 30 00:45:19 2014 +0200 (2014-04-30)
parents 6b9ff2df085e
children f061dffa65bb
files cooker
line diff
     1.1 --- a/cooker	Wed Apr 30 00:34:48 2014 +0200
     1.2 +++ b/cooker	Wed Apr 30 00:45:19 2014 +0200
     1.3 @@ -209,13 +209,22 @@
     1.4  	echo "Creating $ARCH packages DB..."
     1.5  	for pkg in *
     1.6  	do
     1.7 -		unset HOST_ARCH
     1.8 -		. $wok/$pkg/receipt
     1.9 -		#: ${HOST_ARCH=i486}
    1.10 -		if $(echo "$HOST_ARCH" | egrep -q "$ARCH|any"); then
    1.11 -			count=$(($count + 1))
    1.12 -			echo "Adding: $pkg"
    1.13 -			touch $pkg/arch.$ARCH
    1.14 +		if fgrep -q 'HOST_ARCH' $wok/$pkg/receipt; then
    1.15 +			. $wok/$pkg/receipt
    1.16 +			#: ${HOST_ARCH=i486}
    1.17 +			if $(echo "$HOST_ARCH" | egrep -q "$ARCH|any"); then
    1.18 +				count=$(($count + 1))
    1.19 +				echo "Adding: $pkg"
    1.20 +				touch $pkg/arch.$ARCH
    1.21 +			fi
    1.22 +			unset HOST_ARCH
    1.23 +		else
    1.24 +			# HOST_ARCH not set --> in i486
    1.25 +			if [ "$ARCH" == "i486" ]; then
    1.26 +				count=$(($count + 1))
    1.27 +				echo "Adding: $pkg"
    1.28 +				touch $pkg/arch.$ARCH
    1.29 +			fi
    1.30  		fi
    1.31  	done
    1.32  	echo "Packages for $ARCH : $count"