summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db-functions8
-rwxr-xr-xtest/runTest20
2 files changed, 24 insertions, 4 deletions
diff --git a/db-functions b/db-functions
index 7a751bf..4ac282a 100644
--- a/db-functions
+++ b/db-functions
@@ -296,14 +296,14 @@ check_pkgsvn() {
in_array "${repo}" $(get_repos_for_host) || return 1
- if [ ! -f "${WORKDIR}/pkgbuilds/${pkgbase}" ]; then
- mkdir -p "${WORKDIR}/pkgbuilds"
+ if [ ! -f "${WORKDIR}/pkgbuilds/${repo}/${pkgbase}" ]; then
+ mkdir -p "${WORKDIR}/pkgbuilds/${repo}"
svn export -q "${SVNREPO}/${pkgbase}/repos/${repo}-${pkgarch}/PKGBUILD" \
- "${WORKDIR}/pkgbuilds/${pkgbase}" >/dev/null
+ "${WORKDIR}/pkgbuilds/${repo}/${pkgbase}" >/dev/null
[ $? -ge 1 ] && return 1
fi
- local pkgver="$(. "${WORKDIR}/pkgbuilds/${pkgbase}"; echo "${pkgver}-${pkgrel}")"
+ local pkgver="$(. "${WORKDIR}/pkgbuilds/${repo}/${pkgbase}"; echo "${pkgver}-${pkgrel}")"
[ -z "${pkgver}" ] && return 1
if echo "$(basename ${pkgfile})" | grep -q "${pkgver}-${pkgarch}"; then
return 0
diff --git a/test/runTest b/test/runTest
index cfc4ee6..e254de0 100755
--- a/test/runTest
+++ b/test/runTest
@@ -106,6 +106,26 @@ testUpdateAnyPackage() {
rm "${pkgdir}/pkg-any-a/pkg-any-a-1-2-any.pkg.tar.xz"
}
+testUpdateAnyPackageInDifferentRepositoriesAtOnce() {
+ releasePackage extra pkg-any-a any
+
+ pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null
+ sed 's/pkgrel=1/pkgrel=2/g' -i PKGBUILD
+ svn commit -q -m"update pkg to pkgrel=2" >/dev/null
+ makepkg -cf --config ${curdir}/lib/makepkg-i686.conf >/dev/null 2>&1
+ mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/"
+ popd >/dev/null
+
+ releasePackage testing pkg-any-a any
+
+ ../db-update
+
+ checkAnyPackage extra pkg-any-a-1-1-any.pkg.tar.xz any
+ checkAnyPackage testing pkg-any-a-1-2-any.pkg.tar.xz any
+
+ rm "${pkgdir}/pkg-any-a/pkg-any-a-1-2-any.pkg.tar.xz"
+}
+
#
# db-remove
#