tazpkg rev 969

modules/get: continue fixing cookmode
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Nov 26 14:59:03 2018 +0200 (12 months ago)
parents ed2904dae9f2
children f079c87ba419
files modules/get
line diff
     1.1 --- a/modules/get	Mon Nov 26 12:33:58 2018 +0200
     1.2 +++ b/modules/get	Mon Nov 26 14:59:03 2018 +0200
     1.3 @@ -347,7 +347,7 @@
     1.4  	# output: full path to the downloaded package
     1.5  
     1.6  	debug "\nget_pkg('$1', '$2')"
     1.7 -	local repo line namever pkgsum pkgfile
     1.8 +	local repo line namever pkgsum pkgfile pi
     1.9  
    1.10  	IFS=$'\n'
    1.11  	for rep in $PRIORITY; do
    1.12 @@ -359,10 +359,9 @@
    1.13  		namever=$(awk -F$'\t' -vpkg="$(virtual_pkg "$1" "$rep")" \
    1.14  			'$1==pkg || $1"-"$2==pkg {printf "%s-%s", $1, $2; exit}' "$pi")
    1.15  
    1.16 -		case $SLITAZ_ARCH in
    1.17 -			i?86) pkgfile="$namever.tazpkg";;
    1.18 -			*)    pkgfile="$namever-$SLITAZ_ARCH.tazpkg";;
    1.19 -		esac
    1.20 +		pkgfile="$namever-$SLITAZ_ARCH.tazpkg"
    1.21 +		[ -e "$pkgfile" ] ||
    1.22 +		pkgfile="$namever-any.tazpkg"
    1.23  
    1.24  		if [ -n "$namever" ]; then
    1.25  			pkgsum=$(awk -vfile="$pkgfile" '{if($2==file)print $1}' $rep/packages.md5)
    1.26 @@ -454,7 +453,11 @@
    1.27  		if (index(" " $10 " ", " " pkg " ")) { printf("%s-%s", $1, $2); exit; }
    1.28  	}' $pi)"
    1.29  
    1.30 -	[ -n "$namever" ] && pkgfile=$(find "$PKGS" -name "$namever*.tazpkg")
    1.31 +	if [ -n "$namever" ]; then
    1.32 +		pkgfile=$(find "$PKGS" -name "$namever-$SLITAZ_ARCH.tazpkg")
    1.33 +		[ -n "$pkgfile" ] ||
    1.34 +		pkgfile=$(find "$PKGS" -name "$namever-any.tazpkg")
    1.35 +	fi
    1.36  
    1.37  	if [ -n "$pkgfile" -a -f "$pkgfile" ]; then
    1.38  		echo "$pkgfile"