tazpkg rev 223

tazpkg: search into blocked-packages.list silently
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 18 09:25:57 2009 +0000 (2009-02-18)
parents 58c4a2a55317
children 1ce69eee2186
files tazpkg
line diff
     1.1 --- a/tazpkg	Wed Jan 28 08:51:42 2009 +0000
     1.2 +++ b/tazpkg	Wed Feb 18 09:25:57 2009 +0000
     1.3 @@ -1573,7 +1573,7 @@
     1.4  			suffix=$(head -1 mirror)
     1.5  			suffix=packages${suffix#*/packages}
     1.6  			for i in $(cat mirrors 2> /dev/null); do
     1.7 -				grep -q $i mirror || echo $i$suffix >> mirror
     1.8 +				grep -qs $i mirror || echo $i$suffix >> mirror
     1.9  			done
    1.10  			if [ -f "packages.list.bak" ]; then
    1.11  				diff -u packages.list.bak packages.list | grep ^+[a-z] > packages.diff
    1.12 @@ -1623,7 +1623,7 @@
    1.13  			echo -en "\\033[0G                                         "
    1.14  			echo -en "\\033[0G$PACKAGE"
    1.15  			# Skip specified pkgs listed in $LOCALSTATE/blocked-packages.list
    1.16 -			if grep -q "^$PACKAGE" $BLOCKED; then
    1.17 +			if grep -qs "^$PACKAGE" $BLOCKED; then
    1.18  				blocked=$(($blocked+1))
    1.19  			else
    1.20  				# Check if the installed package is in the current list (other
    1.21 @@ -1846,7 +1846,7 @@
    1.22  		check_root
    1.23  		check_for_package_on_cmdline
    1.24  		echo ""
    1.25 -		if grep -q "^$PACKAGE" $BLOCKED; then
    1.26 +		if grep -qs "^$PACKAGE" $BLOCKED; then
    1.27  			echo "$PACKAGE is already in the blocked packages list."
    1.28  			echo ""
    1.29  			exit 0
    1.30 @@ -1866,7 +1866,7 @@
    1.31  		check_root
    1.32  		check_for_package_on_cmdline
    1.33  		echo ""
    1.34 -		if grep -q "^$PACKAGE" $BLOCKED; then
    1.35 +		if grep -qs "^$PACKAGE" $BLOCKED; then
    1.36  			echo -n "Removing $PACKAGE from : $BLOCKED..."
    1.37  			sed -i s/$PACKAGE/''/ $BLOCKED
    1.38  			sed -i '/^$/d' $BLOCKED