tazwok rev 111

'tazwok check' look virtual packages to verify DEPENDS
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 24 16:44:16 2009 +0000 (2009-01-24)
parents e8f657bde503
children b36da717bbd5
files tazwok
line diff
     1.1 --- a/tazwok	Fri Jan 23 22:51:31 2009 +0000
     1.2 +++ b/tazwok	Sat Jan 24 16:44:16 2009 +0000
     1.3 @@ -644,6 +644,18 @@
     1.4  	echo $date | sed "s|[^ ]* [^ ]* \\(.*\\) \\(.*\\):\\(.*\\):\\(.*\\) \\(.*\\) .*|$mon\1\2\3\5|"
     1.5  }
     1.6  
     1.7 +# List packages providing a virtual package
     1.8 +whoprovide()
     1.9 +{
    1.10 +	local i;
    1.11 +	for i in $(grep -l PROVIDE $WOK/*/receipt); do
    1.12 +		. $i
    1.13 +		case " $PROVIDE " in
    1.14 +		*\ $1\ *|*\ $1:*) echo $(basename $(dirname $i));;
    1.15 +		esac
    1.16 +	done
    1.17 +}
    1.18 +
    1.19  ###################
    1.20  # Tazwok commands #
    1.21  ###################
    1.22 @@ -700,9 +712,13 @@
    1.23  			DEPENDS=""
    1.24  			BUILD_DEPENDS=""
    1.25  			WANTED=""
    1.26 +			PACKED_SIZE=""
    1.27 +			UNPACKED_SIZE=""
    1.28  			. $pkg/receipt
    1.29  			[ "$PACKAGE" = "$pkg" ] || echo "Package $PACKAGE should be $pkg"
    1.30  			[ -n "$VERSION" ] || echo "Package $PACKAGE has no VERSION"
    1.31 +			[ -n "$PACKED_SIZE" ] && echo "Package $PACKAGE has hardcoded PACKED_SIZE"
    1.32 +			[ -n "$UNPACKED_SIZE" ] && echo "Package $PACKAGE has hardcoded UNPACKED_SIZE"
    1.33  			if [ -n "$WANTED" ]; then
    1.34  				if [ ! -f $WANTED/receipt ]; then
    1.35  					echo "Package $PACKAGE want unknown $WANTED package"
    1.36 @@ -740,12 +756,14 @@
    1.37  			MSG="Missing dependencies for $PACKAGE $VERSION$EXTRAVERSION :\n"
    1.38  			for i in $DEPENDS; do
    1.39  				[ -d $i ] && continue
    1.40 +				[ -n "$(whoprovide $i)" ] && continue
    1.41  				echo -e "$MSG  $i"
    1.42  				MSG=""
    1.43  			done
    1.44  			MSG="Missing build dependencies for $PACKAGE $VERSION$EXTRAVERSION :\n"
    1.45  			for i in $BUILD_DEPENDS; do
    1.46  				[ -d $i ] && continue
    1.47 +				[ -n "$(whoprovide $i)" ] && continue
    1.48  				echo -e "$MSG  $i"
    1.49  				MSG=""
    1.50  			done