tazwok rev 423 4.2.6

Fix update_wan_db(); Now rwanted are removed from wok-wanted.txt when they should. (Thank godane)
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sun Mar 06 19:01:58 2011 +0100 (2011-03-06)
parents 48072b4ca689
children 5b8e38bbae17 73817c4f672b
files tazwok
line diff
     1.1 --- a/tazwok	Sun Mar 06 17:06:54 2011 +0100
     1.2 +++ b/tazwok	Sun Mar 06 19:01:58 2011 +0100
     1.3 @@ -1420,8 +1420,13 @@
     1.4  update_wan_db()
     1.5  {
     1.6  	local PACKAGE=$PACKAGE
     1.7 -	for RECEIPT in $(fgrep WANTED $WOK/*/receipt | \
     1.8 -		fgrep $PACKAGE | cut -f1 -d ':'); do
     1.9 +	wanted_list=$(fgrep WANTED=\"$PACKAGE\" $WOK/*/receipt | cut -f1 -d ':')
    1.10 +	grep $'\t'$PACKAGE $wan_db | cut -f 1 | while read wan; do
    1.11 +		echo "$wanted_list" | fgrep -q /$wan/receipt && continue
    1.12 +		sed "/^$wan\t/d" -i $wan_db
    1.13 +		plan_regen_cookorder=yes
    1.14 +	done 
    1.15 +	for RECEIPT in $wanted_list; do
    1.16  		WANTED=
    1.17  		source $RECEIPT
    1.18  		[ "$WANTED" ] || continue
    1.19 @@ -1432,6 +1437,7 @@
    1.20  		plan_regen_cookorder=yes
    1.21  		plan_sort_wandb=yes
    1.22  	done
    1.23 +	unset wanted_list
    1.24  }
    1.25  
    1.26  update_dep_db()