[pacman-contrib] [PATCH] pacdiff: don't assume the DBPath has a trailing slash

Eli Schwartz eschwartz at archlinux.org
Tue Dec 11 04:51:44 UTC 2018


If pacman-conf returns a DBPath without a trailing slash, then the
script will error out with:

ERROR: unable to read pacman database /var/lib/pacmanlocal

Which is obviously wrong.

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
 src/pacdiff.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pacdiff.sh.in b/src/pacdiff.sh.in
index 2702451..dbe94ec 100644
--- a/src/pacdiff.sh.in
+++ b/src/pacdiff.sh.in
@@ -142,7 +142,7 @@ if (( USE_PACDB )); then
 		error "unable to read @sysconfdir@/pacman.conf"
 		usage; exit 1
 	fi
-	pac_db="${DBPath:- at localstatedir@/lib/pacman/}local"
+	pac_db="${DBPath:- at localstatedir@/lib/pacman}/local"
 	if [[ ! -d "${pac_db}" ]]; then
 		error "unable to read pacman database %s". "${pac_db}"
 		usage; exit 1
-- 
2.20.0


More information about the pacman-contrib mailing list