tazpkg rev 113
Wipe out get_package_fullname_in_list: does not work
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 02 12:45:17 2008 +0000 (2008-07-02) |
parents | 8a5c8aed88c9 |
children | 58820e6e4e83 |
files | tazpkg |
line diff
1.1 --- a/tazpkg Wed Jul 02 10:54:15 2008 +0000 1.2 +++ b/tazpkg Wed Jul 02 12:45:17 2008 +0000 1.3 @@ -214,28 +214,13 @@ 1.4 fi 1.5 } 1.6 1.7 -# Get a package name in packages.list (whatever the version is). 1.8 -get_package_fullname_in_list() 1.9 -{ 1.10 - local pkg=$1 1.11 - local i 1.12 - while [ "$pkg" != "${pkg%-*}" ]; do 1.13 - pkg=${pkg%-*} 1.14 - for i in '-[0-9]' '-.[0-9]' '-'; do 1.15 - if grep -q ^$pkg$i $2; then 1.16 - grep ^$pkg$i $2 | head -1 # echo 1.17 - return 1.18 - fi 1.19 - done 1.20 - done 1.21 -} 1.22 - 1.23 # Check for a package in packages.list. Used by get and get-install to grep 1.24 # package basename. 1.25 check_for_package_in_list() 1.26 { 1.27 local pkg 1.28 - pkg=$(get_package_fullname_in_list $PACKAGE $LOCALSTATE/packages.list) 1.29 + pkg=$(grep "^$PACKAGE-[0-9]" $LOCALSTATE/packages.list | head -1) 1.30 + [ -n "$pkg" ] || pkg=$(grep "^$PACKAGE-.[\.0-9]" $LOCALSTATE/packages.list | head -1) 1.31 if [ -n "$pkg" ]; then 1.32 PACKAGE=$pkg 1.33 else