Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/.gitignore1
-rw-r--r--contrib/checkupdates.sh.in18
-rw-r--r--contrib/pacscripts.sh.in7
3 files changed, 14 insertions, 12 deletions
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
diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in
index b41dfa03..48ceff94 100644
--- a/contrib/checkupdates.sh.in
+++ b/contrib/checkupdates.sh.in
@@ -19,25 +19,25 @@
#
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."
+ 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
diff --git a/contrib/pacscripts.sh.in b/contrib/pacscripts.sh.in
index 84687145..62c4e35b 100644
--- a/contrib/pacscripts.sh.in
+++ b/contrib/pacscripts.sh.in
@@ -5,6 +5,7 @@
#
# Copyright (c) 2009 Giulio "giulivo" Fidente <giulivo.navigante@gmail.com>
# Copyright (c) 2009 Xavier Chantry <shiningxc@gmail.com>
+# Copyright (c) 2009-2013 Pacman Development Team <pacman-dev@archlinux.org>
#
# 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
@@ -113,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