cookutils diff cook @ rev 198

cook: exist on missing dep (we may build bped)
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 22 03:32:34 2011 +0200 (2011-05-22)
parents 879c0291b738
children 7b35d8de2df4
line diff
     1.1 --- a/cook	Sat May 21 18:17:58 2011 +0100
     1.2 +++ b/cook	Sun May 22 03:32:34 2011 +0200
     1.3 @@ -453,14 +453,20 @@
     1.4  				# Try local package first. In some cases implicit doesn't exist, ex:
     1.5  				# libboost-dev exists but not libboost, so check if we got vers.
     1.6  				unset vers
     1.7 -				vers=$(grep ^VERSION $WOK/$i/receipt 2>/dev/null | cut -d '"' -f 2)
     1.8 +				vers=$(grep ^VERSION= $WOK/$i/receipt 2>/dev/null | cut -d '"' -f 2)
     1.9  				if [ -f "$PKGS/$i-$vers.tazpkg" ]; then
    1.10 -					gettext "Installing dep (pkg/local):"; echo " $i"
    1.11 +					gettext "Installing dep (pkg/local):"; echo " $i $vers"
    1.12  					cd $PKGS && tazpkg install $i-$vers.tazpkg >/dev/null
    1.13  				else
    1.14  					if [ "$vers" ]; then
    1.15 -						gettext "Installing dep (web/cache):"; echo " $i"
    1.16 -						tazpkg get-install $i >/dev/null
    1.17 +						if grep -q ^$i-$vers.tazpkg $DB/packages.list; then
    1.18 +							gettext "Installing dep (web/cache):"; echo " $i $vers"
    1.19 +							tazpkg get-install $i >/dev/null
    1.20 +						else
    1.21 +							# So package exist in wok but not available.
    1.22 +							gettext "Missing dep:" ; echo " $i $vers"
    1.23 +							exit 1
    1.24 +						fi
    1.25  					fi
    1.26  				fi
    1.27  			fi