summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-09-11 23:38:41 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-09-11 23:38:41 +0200
commita8832a42d659b58f3494e414e67ea3d7f334c87d (patch)
treeda57f3d41e35a640bb5d8723d9a2828d767c9ff7
parentf121126f8166fb6dc261ea82f2890ba6693d047e (diff)
downloaddbscripts-a8832a42d659b58f3494e414e67ea3d7f334c87d.tar.gz
dbscripts-a8832a42d659b58f3494e414e67ea3d7f334c87d.tar.xz
Fix check_pkgrepos
Don't use globing as this will match a package of the same version but another arch. We can be more specific here as there are no longer packages without $arch extension.
-rw-r--r--db-functions12
1 files changed, 6 insertions, 6 deletions
diff --git a/db-functions b/db-functions
index 939f2d5..d9b38e2 100644
--- a/db-functions
+++ b/db-functions
@@ -319,18 +319,18 @@ check_pkgrepos() {
[ $? -ge 1 ] && return 1
local pkgver="$(getpkgver ${pkgfile})"
[ $? -ge 1 ] && return 1
+ local pkgarch="$(getpkgarch ${pkgfile})"
+ [ $? -ge 1 ] && return 1
- if [ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-"*${PKGEXT} ]; then
- return 1
- fi
+ [ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT} ] && return 1
+ [ -f "${FTP_BASE}/${PKGPOOL}/$(basename ${pkgfile})" ] && return 1
local repo
local arch
for repo in ${PKGREPOS[@]}; do
for arch in ${ARCHES[@]}; do
- if [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkgname}-${pkgver}"*${PKGEXT} ]; then
- return 1
- fi
+ [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT} ] && return 1
+ [ -f "${FTP_BASE}/${repo}/os/${arch}/$(basename ${pkgfile})" ] && return 1
done
done