tazwok rev 98

Add build-depends subcommand
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 10 18:31:34 2008 +0000 (2008-10-10)
parents 512988521ab9
children 6f61637af7b4
files tazwok
line diff
     1.1 --- a/tazwok	Sun Oct 05 23:41:46 2008 +0000
     1.2 +++ b/tazwok	Fri Oct 10 18:31:34 2008 +0000
     1.3 @@ -87,6 +87,7 @@
     1.4  \033[1mCommands: \033[0m\n
     1.5    usage          Print this short usage.
     1.6    stats          Print Tazwok statistics from the config file and the wok.
     1.7 +  build-depends  Generate a list of package to build wok.
     1.8    cmp|compare    Compare the wok and the cooked pkgs (--remove old pkgs).
     1.9    list           List all packages in the wok tree or by category.
    1.10    info           Get information about a package in the wok.
    1.11 @@ -647,6 +648,25 @@
    1.12  ================================================================================"
    1.13  		echo ""
    1.14  		;;
    1.15 +	build-depends)
    1.16 +		# List dependancies to rebuild wok
    1.17 +		cd $WOK
    1.18 +		ALL_DEPS="slitaz-toolchain"
    1.19 +		echo $ALL_DEPS
    1.20 +		for pkg in $(ls $2)
    1.21 +		do
    1.22 +			[ -f $pkg/receipt ] || continue
    1.23 +			BUILD_DEPENDS=""
    1.24 +			. $pkg/receipt
    1.25 +			for i in $BUILD_DEPENDS; do
    1.26 +				case " $ALL_DEPS " in
    1.27 +				*\ $i\ *);;
    1.28 +				*)	ALL_DEPS="$ALL_DEPS $i"
    1.29 +					echo $i;;
    1.30 +				esac
    1.31 +			done
    1.32 +		done
    1.33 +		;;
    1.34  	check)
    1.35  		# Check wok consistancy
    1.36  		echo ""
    1.37 @@ -722,6 +742,7 @@
    1.38  ================================================================================"
    1.39  		for pkg in $WOK/*
    1.40  		do
    1.41 +			WANTED=""
    1.42  			. $pkg/receipt
    1.43  			echo "$PACKAGE-$VERSION.tazpkg" >> /tmp/wok.list.$$
    1.44  			tpkg="$(ls $PACKAGES_REPOSITORY/$PACKAGE-$VERSION*.tazpkg 2> /dev/null)"
    1.45 @@ -745,6 +766,9 @@
    1.46  				fi
    1.47  			fi
    1.48  			if [ "$2" = "--cook" ]; then
    1.49 +				if [ -n "$WANTED" -a ! -d $WOK/$WANTED/taz ]; then
    1.50 +					yes '' | tazwok cook $WANTED
    1.51 +				fi
    1.52  				yes '' | tazwok cook $PACKAGE
    1.53  			fi
    1.54  		done