[arch-projects] [dbscripts] [PATCH 1/2] Don't quote $PKGEXT

Luke Shumaker lukeshu at lukeshu.com
Thu Feb 15 19:49:45 UTC 2018


From: Luke Shumaker <lukeshu at parabola.nu>

This partially reverts commit b61a7148eaf546a31597b74d9dd8948e4a39dea1.

In dbscripts, PKGEXT is a glob pattern--it needs to be "unquoted"; and
The magic-quoting done by `[[ ... ]]` breaks that.  The closing-quote
coming before ${PKGEXT} was quite intentional.
---
 db-functions | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/db-functions b/db-functions
index e8949d7..93a5af3 100644
--- a/db-functions
+++ b/db-functions
@@ -374,8 +374,8 @@ check_pkgrepos() {
 	local pkgver="$(getpkgver ${pkgfile})" || return 1
 	local pkgarch="$(getpkgarch ${pkgfile})" || return 1
 
-	[[ -f ${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}${PKGEXT} ]] && return 1
-	[[ -f ${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}${PKGEXT}.sig ]] && return 1
+	[ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT} ] && return 1
+	[ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT}.sig ] && return 1
 	[[ -f ${FTP_BASE}/${PKGPOOL}/${pkgfile##*/} ]] && return 1
 	[[ -f ${FTP_BASE}/${PKGPOOL}/${pkgfile##*/}.sig ]] && return 1
 
-- 
2.16.1


More information about the arch-projects mailing list