[arch-projects] [dbscripts] [PATCH] Fix db-archive not running at the correct time.
Eli Schwartz
eschwartz at archlinux.org
Thu Jan 10 18:10:57 UTC 2019
At the point when it was being run, the signature was not yet moved to
PKGPOOL.
Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
Discovered while debugging the verify branch.
db-update | 2 +-
test/cases/db-update.bats | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/db-update b/db-update
index 3a66c859..4848fef0 100755
--- a/db-update
+++ b/db-update
@@ -86,13 +86,13 @@ for repo in "${repos[@]}"; do
# any packages might have been moved by the previous run
if [[ -f ${pkg} ]]; then
mv "${pkg}" "$FTP_BASE/${PKGPOOL}"
- "$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")/db-archive" "${FTP_BASE}/${PKGPOOL}/${pkg##*/}"
fi
ln -s "../../../${PKGPOOL}/${pkgfile}" "$FTP_BASE/$repo/os/${pkgarch}"
# also move signatures
if [[ -f ${pkg}.sig ]]; then
mv "${pkg}.sig" "$FTP_BASE/${PKGPOOL}"
fi
+ "$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")/db-archive" "${FTP_BASE}/${PKGPOOL}/${pkg##*/}"
if [[ -f $FTP_BASE/${PKGPOOL}/${pkgfile}.sig ]]; then
ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "$FTP_BASE/$repo/os/${pkgarch}"
fi
diff --git a/test/cases/db-update.bats b/test/cases/db-update.bats
index bc978302..e1782a59 100644
--- a/test/cases/db-update.bats
+++ b/test/cases/db-update.bats
@@ -91,6 +91,7 @@ load ../lib/common
releasePackage extra pkg-any-a
db-update
[[ -f ${ARCHIVE_BASE}/packages/p/pkg-any-a/pkg-any-a-1-1-any${PKGEXT} ]]
+ [[ -f ${ARCHIVE_BASE}/packages/p/pkg-any-a/pkg-any-a-1-1-any${PKGEXT}.sig ]]
}
@test "update same any package to same repository fails" {
--
2.20.1
More information about the arch-projects
mailing list