From 42831990397852b5e3519c82ce2977bddaf99d4f Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 16 Jun 2013 16:36:20 +1000 Subject: contrib/checkupdates: fix typo Signed-off-by: Allan McRae --- contrib/checkupdates.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in index b41dfa03..0079a244 100644 --- a/contrib/checkupdates.sh.in +++ b/contrib/checkupdates.sh.in @@ -19,7 +19,7 @@ # if (( $# > 0 )); then - echo "checkupdate: Safely print a list of pending updates." + echo "checkupdates: Safely print a list of pending updates." echo "Use: checkupdates" echo "Export the 'CHECKUPDATE_DB' variable to change the path of the temporary database." exit 0 -- cgit v1.2.3-70-g09d2 From 31d51052e1f4f7502ca8c5c0bf3bc62eb150fb98 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 18 Jun 2013 12:53:26 +1000 Subject: checkupdates: Consistency in environmental variable name Use CHECKUPDATES_DB rather than CHECKUPDATE_DB for consistency with the script name. Signed-off-by: Allan McRae --- contrib/checkupdates.sh.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'contrib') diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in index 0079a244..48ceff94 100644 --- a/contrib/checkupdates.sh.in +++ b/contrib/checkupdates.sh.in @@ -21,23 +21,23 @@ if (( $# > 0 )); then echo "checkupdates: Safely print a list of pending updates." echo "Use: checkupdates" - echo "Export the 'CHECKUPDATE_DB' variable to change the path of the temporary database." + echo "Export the 'CHECKUPDATES_DB' variable to change the path of the temporary database." exit 0 fi -if [[ -z $CHECKUPDATE_DB ]]; then - CHECKUPDATE_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/" +if [[ -z $CHECKUPDATES_DB ]]; then + CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/" fi -trap 'rm -f $CHECKUPDATE_DB/db.lck' INT TERM EXIT +trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT DBPath="${DBPath:-@localstatedir@/lib/pacman/}" eval $(awk -F' *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' @sysconfdir@/pacman.conf) -mkdir -p "$CHECKUPDATE_DB" -ln -s "${DBPath}/local" "$CHECKUPDATE_DB" &> /dev/null -fakeroot pacman -Sy --dbpath "$CHECKUPDATE_DB" --logfile /dev/null &> /dev/null -pacman -Qqu --dbpath "$CHECKUPDATE_DB" 2> /dev/null +mkdir -p "$CHECKUPDATES_DB" +ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null +fakeroot pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null +pacman -Qqu --dbpath "$CHECKUPDATES_DB" 2> /dev/null exit 0 -- cgit v1.2.3-70-g09d2 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') 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-70-g09d2 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') 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-70-g09d2 From c81615f38cb3a835b9248a5aafaf1dc345df15fa Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 18 Jun 2013 13:26:42 +1000 Subject: contrib: update .gitignore Signed-off-by: Allan McRae --- contrib/.gitignore | 1 + 1 file changed, 1 insertion(+) (limited to 'contrib') diff --git a/contrib/.gitignore b/contrib/.gitignore index afbca0fb..a1818135 100644 --- a/contrib/.gitignore +++ b/contrib/.gitignore @@ -1,5 +1,6 @@ bacman bash_completion +checkupdates paccache pacdiff paclist -- cgit v1.2.3-70-g09d2