tazwok rev 223

Improve with_dev, use --auto option for tazpkg remove
author Antoine Bodin <gokhlayeh@slitaz.org>
date Wed Feb 02 03:47:22 2011 +0100 (2011-02-02)
parents a772404fbbf0
children c1c9086a9e31
files tazwok
line diff
     1.1 --- a/tazwok	Wed Feb 02 00:49:10 2011 +0100
     1.2 +++ b/tazwok	Wed Feb 02 03:47:22 2011 +0100
     1.3 @@ -357,7 +357,7 @@
     1.4  	report step "Removing previous build dependencies"
     1.5  	echo "Removing theses packages : $@"
     1.6  	for pkg in $@; do
     1.7 -		[ -d "$INSTALLED/$pkg" ] && echo y | tazpkg remove $pkg
     1.8 +		[ -d "$INSTALLED/$pkg" ] && tazpkg remove $pkg --auto
     1.9  	done
    1.10  	report end-step
    1.11  }
    1.12 @@ -1371,9 +1371,19 @@
    1.13  
    1.14  look_for_dev()
    1.15  {
    1.16 -	[ -f "$WOK/$PACKAGE-dev/receipt" ] && echo $PACKAGE-dev && return
    1.17 -	[ "$undigest" ] && [ -f "$SLITAZ_DIR/$SLITAZ_VERSION/wok/$PACKAGE-dev/receipt" ] && \
    1.18 -		echo $PACKAGE-dev
    1.19 +	WANTED=$(look_for_wanted)
    1.20 +	if [ "$WANTED" ]; then
    1.21 +		if [ "$undigest" ] && [ ! -f "$WOK/$WANTED/receipt" ]; then
    1.22 +			[ -f "$SLITAZ_DIR/$SLITAZ_VERSION/wok/$WANTED-dev/receipt" ] && echo $WANTED-dev
    1.23 +		else
    1.24 +			[ -f "$WOK/$WANTED-dev/receipt" ] && echo $WANTED-dev
    1.25 +		fi
    1.26 +	fi
    1.27 +	if [ "$undigest" ] && [ ! -f "$WOK/$PACKAGE/receipt" ]; then
    1.28 +		[ -f "$SLITAZ_DIR/$SLITAZ_VERSION/wok/$PACKAGE-dev/receipt" ] && echo $PACKAGE-dev
    1.29 +	else
    1.30 +		[ -f "$WOK/$PACKAGE-dev/receipt" ] && echo $PACKAGE-dev
    1.31 +	fi
    1.32  }
    1.33  
    1.34  with_dev()
    1.35 @@ -1413,7 +1423,7 @@
    1.36  scan()
    1.37  {
    1.38  	# Get packages in argument.
    1.39 -	local PACKAGE pkg_list=
    1.40 +	local PACKAGE WANTED pkg_list=
    1.41  	for arg in $@; do
    1.42  		[ "$arg" = "${arg#--}" ] || continue
    1.43  		pkg_list="$pkg_list $arg"