From 85fde7038f6cf3fdfb688dfecf60dc3ca5dd03ab Mon Sep 17 00:00:00 2001 From: Karol Blazewicz Date: Mon, 17 Jun 2013 23:48:38 +0200 Subject: pacscripts: don't read the whole package from cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit '-q' means "Exit as soon as each specified pattern or filename has been matched." There is no reason to keep reading the whole package from the cache when the install script has already been printed to stdout. Signed-off-by: Karol Błażewicz Signed-off-by: Allan McRae --- contrib/pacscripts.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/pacscripts.sh.in') diff --git a/contrib/pacscripts.sh.in b/contrib/pacscripts.sh.in index 84687145..368e0850 100644 --- a/contrib/pacscripts.sh.in +++ b/contrib/pacscripts.sh.in @@ -5,6 +5,7 @@ # # Copyright (c) 2009 Giulio "giulivo" Fidente # Copyright (c) 2009 Xavier Chantry +# Copyright (c) 2009-2013 Pacman Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -91,7 +92,7 @@ print_db() { } print_pkg() { - if ! bsdtar -xOf "$1" .INSTALL 2>/dev/null; then + if ! bsdtar -xqOf "$1" .INSTALL 2>/dev/null; then error "Package $1 does not include any .INSTALL script" return 1 fi -- cgit v1.2.3 From cd421c83832adb0a81a8a5b5c3d0ad3cd91c2adb Mon Sep 17 00:00:00 2001 From: Karol Blazewicz Date: Mon, 17 Jun 2013 23:48:39 +0200 Subject: pacscripts: Update for pacman changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes to pacman mean that -Sp can be called without root permissions and '-d' needs passed twice to completely ignore dependencies. Signed-off-by: Karol Błażewicz Signed-off-by: Allan McRae --- contrib/pacscripts.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/pacscripts.sh.in') diff --git a/contrib/pacscripts.sh.in b/contrib/pacscripts.sh.in index 368e0850..62c4e35b 100644 --- a/contrib/pacscripts.sh.in +++ b/contrib/pacscripts.sh.in @@ -114,10 +114,10 @@ print_scriptlet() { error "Package $1 not found" return 1 fi - url=$(spacman -Sdp $1 | tail -n1) + url=$(pacman -Sddp $1) filename=$(basename $url) if [ ! -f "$pac_cache/$filename" ]; then - if ! spacman -Sdw --noconfirm $1 >&2; then + if ! spacman -Sddw --noconfirm $1 >&2; then error "Failed to download $1" return 1 fi -- cgit v1.2.3