tazpkg rev 879

modules/get: restore virtual packages support (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Dec 02 12:43:47 2015 +0100 (2015-12-02)
parents 97454e15c034
children 908bac5e1d8c
files modules/get
line diff
     1.1 --- a/modules/get	Mon Nov 30 02:27:33 2015 +0200
     1.2 +++ b/modules/get	Wed Dec 02 12:43:47 2015 +0100
     1.3 @@ -304,6 +304,8 @@
     1.4  			return
     1.5  		fi
     1.6  	done
     1.7 +	# the real package name
     1.8 +	echo $1
     1.9  }
    1.10  
    1.11  # Download package file to the cache
    1.12 @@ -321,8 +323,8 @@
    1.13  	for rep in $PRIORITY; do
    1.14  		[ ! -f "$rep/packages.info" ] && continue
    1.15  		# If found, output string "<name>-<ver>:<sum>"
    1.16 -		line=$(awk -F$'\t' -vpkg="$1" -vvpkg="$(virtual_pkg "$1" "$rep")" \
    1.17 -			'$1==pkg || $1"-"$2==pkg || $1==vpkg || $1"-"$2==vpkg {printf "%s-%s:%s", $1, $2, $9; exit}' "$rep/packages.info")
    1.18 +		line=$(awk -F$'\t' -vpkg="$(virtual_pkg "$1" "$rep")" \
    1.19 +			'$1==pkg || $1"-"$2==pkg {printf "%s-%s:%s", $1, $2, $9; exit}' "$rep/packages.info")
    1.20  		if [ -n "$line" ]; then
    1.21  			namever=${line%:*}; pkgsum=${line#*:}
    1.22  			break