tazpkg rev 957

modules/get, modules/install: patch for the x86_64 support.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jan 24 12:10:42 2018 +0200 (22 months ago)
parents 88d62319f89e
children e6f7a109cfe3
files modules/get modules/install
line diff
     1.1 --- a/modules/get	Thu Jan 04 15:50:33 2018 +0200
     1.2 +++ b/modules/get	Wed Jan 24 12:10:42 2018 +0200
     1.3 @@ -428,16 +428,18 @@
     1.4  	[ -e "/etc/slitaz/cook.conf" ] && . /etc/slitaz/cook.conf
     1.5  
     1.6  	# Find local package
     1.7 -	pkgfile="$(awk -F$'\t' -vpkg="$1" -vbase="$PKGS" '{
     1.8 -		if ($1 == pkg) { printf("%s/%s-%s.tazpkg", base, $1, $2); exit; }
     1.9 +	namever="$(awk -F$'\t' -vpkg="$1" '{
    1.10 +		if ($1 == pkg) { printf("%s-%s", $1, $2); exit; }
    1.11  	}' $PKGS/packages.info)"
    1.12  
    1.13  	# Find local provided package
    1.14 -	[ -n "$pkgfile" ] ||
    1.15 -	pkgfile="$(awk -F$'\t' -vpkg="$1" -vbase="$PKGS" '{
    1.16 -		if (index(" " $10 " ", " " pkg " ")) { printf("%s/%s-%s.tazpkg", base, $1, $2); exit; }
    1.17 +	[ -n "$namever" ] ||
    1.18 +	namever="$(awk -F$'\t' -vpkg="$1" '{
    1.19 +		if (index(" " $10 " ", " " pkg " ")) { printf("%s-%s", $1, $2); exit; }
    1.20  	}' $PKGS/packages.info)"
    1.21  
    1.22 +	[ -n "$namever" ] && pkgfile=$(find "$PKGS" -name "$namever*.tazpkg")
    1.23 +
    1.24  	if [ -n "$pkgfile" -a -f "$pkgfile" ]; then
    1.25  		echo "$pkgfile"
    1.26  	else
     2.1 --- a/modules/install	Thu Jan 04 15:50:33 2018 +0200
     2.2 +++ b/modules/install	Wed Jan 24 12:10:42 2018 +0200
     2.3 @@ -112,10 +112,10 @@
     2.4  	# Get the receipt's variable DEPENDS
     2.5  	DEPENDS=$(
     2.6  		TMP_DIR=$(mktemp -d); cd "$TMP_DIR"
     2.7 -		cpio --quiet -i receipt >/dev/null 2>&1
     2.8 +		cpio --quiet -i receipt < "$1" >/dev/null 2>&1
     2.9  		. ./receipt; echo $DEPENDS
    2.10  		rm -rf "$TMP_DIR"
    2.11 -	) < "$1"
    2.12 +	)
    2.13  
    2.14  	unset num missing_packages
    2.15  	for depend in $DEPENDS; do
    2.16 @@ -332,7 +332,7 @@
    2.17  	TMP_DIR="$(mktemp -d)"
    2.18  
    2.19  	# Get receipt's variables and functions
    2.20 -	{ cd "$TMP_DIR"; cpio --quiet -i receipt >/dev/null 2>&1; } < "$PACKAGE_FILE"
    2.21 +	{ cd "$TMP_DIR"; cpio --quiet -i receipt < "$PACKAGE_FILE" >/dev/null 2>&1; }
    2.22  	# Why next code? "Bad" receipt sourcing can redefine some vital TazPkg variables.
    2.23  	(
    2.24  		. "$TMP_DIR/receipt"
    2.25 @@ -663,10 +663,10 @@
    2.26  
    2.27  PACKAGE=$(
    2.28  	tmp_dir=$(mktemp -d); cd "$tmp_dir"
    2.29 -	cpio --quiet -i receipt >/dev/null 2>&1
    2.30 +	cpio --quiet -i receipt < "$1" >/dev/null 2>&1
    2.31  	. ./receipt; echo $PACKAGE
    2.32  	rm -rf "$tmp_dir"
    2.33 -) < "$1"
    2.34 +)
    2.35  
    2.36  if grep -qs "^$PACKAGE$" "$BLOCKED"; then
    2.37  	_ 'Package "%s" blocked.' "$PACKAGE"