From a8832a42d659b58f3494e414e67ea3d7f334c87d Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 11 Sep 2010 23:38:41 +0200 Subject: 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. --- db-functions | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'db-functions') 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 -- cgit v1.2.3-24-g4f1b