summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-28 03:03:08 +0200
committerDan McGee <dan@archlinux.org>2011-03-28 03:03:08 +0200
commitea216d3f5a84814c512ab51ac37a4055b82032c3 (patch)
tree9f8f94b4f9c38a55c12e0ed35d5c746ff52c4484
parent68701a98aff46821e7e3440d5db233adbe249770 (diff)
downloadpacman-ea216d3f5a84814c512ab51ac37a4055b82032c3.tar.gz
pacman-ea216d3f5a84814c512ab51ac37a4055b82032c3.tar.xz
Clarify error message in pacman-db-upgrade
Addresses FS#23451. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/pacman-db-upgrade.sh.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
index 0813acc6..17d8beb4 100644
--- a/scripts/pacman-db-upgrade.sh.in
+++ b/scripts/pacman-db-upgrade.sh.in
@@ -83,10 +83,14 @@ if [[ -n $1 ]]; then
dbroot="$1"
fi
-if [[ ! -d $dbroot || ! -d $dbroot/local ]]; then
+if [[ ! -d $dbroot ]]; then
die "$(gettext "%s does not exist or is not a directory.")" "$dbroot"
fi
+if [[ ! -d $dbroot/local ]]; then
+ die "$(gettext "%s is not a pacman database directory.")" "$dbroot"
+fi
+
if [[ ! -w $dbroot ]]; then
die "$(gettext "You must have correct permissions to upgrade the database.")"
fi