# HG changeset patch # User Pascal Bellard # Date 1234949157 0 # Node ID 3a9df89fdf4d3aee2e64fa67f485cad258f39d73 # Parent 58c4a2a55317d37a88602670ba8fca8f33802b18 tazpkg: search into blocked-packages.list silently diff -r 58c4a2a55317 -r 3a9df89fdf4d tazpkg --- a/tazpkg Wed Jan 28 08:51:42 2009 +0000 +++ b/tazpkg Wed Feb 18 09:25:57 2009 +0000 @@ -1573,7 +1573,7 @@ suffix=$(head -1 mirror) suffix=packages${suffix#*/packages} for i in $(cat mirrors 2> /dev/null); do - grep -q $i mirror || echo $i$suffix >> mirror + grep -qs $i mirror || echo $i$suffix >> mirror done if [ -f "packages.list.bak" ]; then diff -u packages.list.bak packages.list | grep ^+[a-z] > packages.diff @@ -1623,7 +1623,7 @@ echo -en "\\033[0G " echo -en "\\033[0G$PACKAGE" # Skip specified pkgs listed in $LOCALSTATE/blocked-packages.list - if grep -q "^$PACKAGE" $BLOCKED; then + if grep -qs "^$PACKAGE" $BLOCKED; then blocked=$(($blocked+1)) else # Check if the installed package is in the current list (other @@ -1846,7 +1846,7 @@ check_root check_for_package_on_cmdline echo "" - if grep -q "^$PACKAGE" $BLOCKED; then + if grep -qs "^$PACKAGE" $BLOCKED; then echo "$PACKAGE is already in the blocked packages list." echo "" exit 0 @@ -1866,7 +1866,7 @@ check_root check_for_package_on_cmdline echo "" - if grep -q "^$PACKAGE" $BLOCKED; then + if grep -qs "^$PACKAGE" $BLOCKED; then echo -n "Removing $PACKAGE from : $BLOCKED..." sed -i s/$PACKAGE/''/ $BLOCKED sed -i '/^$/d' $BLOCKED