# HG changeset patch # User Christophe Lincoln # Date 1337954443 -7200 # Node ID e5c7b2b2d835e21b6d5125a644e17b9c75160722 # Parent 50cd05f3fa153fe577a5a3717a5e98b68d838ced spk-add: handle online arch packages (installing online pkgs from an ARM machine works :-) diff -r 50cd05f3fa15 -r e5c7b2b2d835 spk-add --- a/spk-add Fri May 25 15:53:02 2012 +0200 +++ b/spk-add Fri May 25 16:00:43 2012 +0200 @@ -119,7 +119,7 @@ case "$SLITAZ_ARCH" in arm|x86_64) arch="-${SLITAZ_ARCH}" ;; esac - tmpdir="$tmpdir/$PACKAGE-${VERSION}${arch}" + tmpdir="$tmpdir/$PACKAGE-${VERSION}${arch}" # Get files to remove if upgrading local files_to_remove @@ -300,12 +300,6 @@ #fi # Check if package is mirrored - #if ! mirrored_pkg $package_name; then - #gettext "Could not find package on mirror:" - #boldify " $package_name" && exit 1 - #fi - - # Check if package is mirrored mirrored_pkg $package_name if [ ! "$mirrored" ]; then gettext "Could not find package on mirror:" @@ -313,7 +307,14 @@ fi # We want: package-version.tazpkg - local package_full=$(full_package $package_name) + local package_full=$(full_package ${package_name}) + + # Add architecture string to package full name + case "$SLITAZ_ARCH" in + arm|x86_64) + pkgarch="-${SLITAZ_ARCH}.tazpkg" + package_full=$(echo $package_full | sed s/.tazpkg/$pkgarch/) ;; + esac # Let fetch the package by download() [ "$count" == 1 ] && newline