tazwok rev 140

tazwok check: look for packages to rebuild
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 01 12:01:39 2009 +0200 (2009-07-01)
parents b07f8b1c7002
children 32fe1a5bde6f
files tazwok
line diff
     1.1 --- a/tazwok	Mon Jun 29 13:01:59 2009 +0200
     1.2 +++ b/tazwok	Wed Jul 01 12:01:39 2009 +0200
     1.3 @@ -40,6 +40,9 @@
     1.4  PACKAGE=$2
     1.5  LIST=$2
     1.6  
     1.7 +LOCALSTATE=/var/lib/tazpkg
     1.8 +INSTALLED=$LOCALSTATE/installed
     1.9 +
    1.10  # Include config file or exit if no file found.
    1.11  if [ -f "./tazwok.conf" ]; then
    1.12  	. ./tazwok.conf
    1.13 @@ -208,7 +211,7 @@
    1.14  	echo "Checking for build dependencies..."
    1.15  	for pkg in $BUILD_DEPENDS
    1.16  	do
    1.17 -		if [ ! -d "/var/lib/tazpkg/installed/$pkg" ]; then
    1.18 +		if [ ! -d "$INSTALLED/$pkg" ]; then
    1.19  			MISSING_PACKAGE=$pkg
    1.20  		fi
    1.21  	done
    1.22 @@ -216,7 +219,7 @@
    1.23  		echo "================================================================================"
    1.24  		for pkg in $BUILD_DEPENDS
    1.25  		do
    1.26 -			if [ ! -d "/var/lib/tazpkg/installed/$pkg" ]; then
    1.27 +			if [ ! -d "$INSTALLED/$pkg" ]; then
    1.28  				MISSING_PACKAGE=$pkg
    1.29  				echo "Missing : $pkg"
    1.30  			fi
    1.31 @@ -228,7 +231,7 @@
    1.32  			install)
    1.33  				for pkg in $BUILD_DEPENDS
    1.34  				do
    1.35 -					if [ ! -d "/var/lib/tazpkg/installed/$pkg" ]; then
    1.36 +					if [ ! -d "$INSTALLED/$pkg" ]; then
    1.37  						tazpkg get-install $pkg
    1.38  					fi
    1.39  				done ;;
    1.40 @@ -791,8 +794,8 @@
    1.41  
    1.42  		mkdir $TMPDIR
    1.43  		cd $TMPDIR
    1.44 -		for i in /var/lib/tazpkg/files.list.lzma \
    1.45 -	 		/var/lib/tazpkg/undigest/*/files.list.lzma ; do
    1.46 +		for i in $LOCALSTATE/files.list.lzma \
    1.47 +	 		$LOCALSTATE/undigest/*/files.list.lzma ; do
    1.48  	 		[ -f $i ] && lzma d $i -so >> files.list
    1.49  		done
    1.50  		for pkg in $PACKAGES_REPOSITORY/*.tazpkg ; do
    1.51 @@ -814,7 +817,7 @@
    1.52  						case " $ALL_DEPENDS " in
    1.53  						*\ $dep\ *) continue 2;;
    1.54  						esac
    1.55 -						for vdep in $(grep $dep /var/lib/tazpkg/packages.equiv | cut -d= -f1); do
    1.56 +						for vdep in $(grep $dep $LOCALSTATE/packages.equiv | cut -d= -f1); do
    1.57  							case " $ALL_DEPENDS " in
    1.58  							*\ $vdep\ *) continue 3;;
    1.59  							esac
    1.60 @@ -918,6 +921,10 @@
    1.61  			MSG="Dependencies loop between $PACKAGE and :\n"
    1.62  			ALL_DEPS=""
    1.63  			check_for_deps_loop $PACKAGE $DEPENDS
    1.64 +			[ -d $WOK/$pkg/taz ] && for i in $BUILD_DEPENDS; do
    1.65 +				[ $WOK/$pkg/taz -nt $INSTALLED/$i ] && continue
    1.66 +				echo "$pkg should be rebuilt since $i installation"
    1.67 +			done
    1.68  		done
    1.69  		;;
    1.70  	cmp|compare)