tazpkg rev 189

Add undigest support for tazpkgbox/search
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Oct 28 12:32:30 2008 +0000 (2008-10-28)
parents 3db7dbf0fe52
children cf614e32ecb9
files lib/tazpkgbox/search
line diff
     1.1 --- a/lib/tazpkgbox/search	Mon Oct 27 23:25:38 2008 +0000
     1.2 +++ b/lib/tazpkgbox/search	Tue Oct 28 12:32:30 2008 +0000
     1.3 @@ -15,8 +15,8 @@
     1.4  		else if ($0 != "" && show != 0) printf("%s %s\n",pkg,$0);
     1.5  	}' | while read pkg file; do
     1.6  		[ "$pkg" = "0" ] && continue
     1.7 -		version=$(grep "^$pkg " /var/lib/tazpkg/packages.desc | \
     1.8 -			  awk '{ print $3 }' )
     1.9 +		version=$(grep -hs "^$pkg " /var/lib/tazpkg/packages.desc \
    1.10 +		  /var/lib/tazpkg/undigest/*/packages.desc | awk '{ print $3 }')
    1.11  		echo "$pkg|$version|$file"
    1.12  	done
    1.13  }
    1.14 @@ -39,6 +39,7 @@
    1.15  done
    1.16  
    1.17  # Search mirrored.
    1.18 -grep "$SEARCH" /var/lib/tazpkg/packages.desc > /tmp/tazpkgbox/search-mirrored
    1.19 +grep -sh "$SEARCH" /var/lib/tazpkg/packages.desc \
    1.20 +  /var/lib/tazpkg/undigest/*/packages.desc | sort > /tmp/tazpkgbox/search-mirrored
    1.21  
    1.22  exit 0