summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-08 12:47:06 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-08 12:47:06 +0200
commitff0745c50507f0cea48dbf97b8f55734698e3c13 (patch)
tree97c2868e95b07e2d98738db9472511b40ade387a
parentd0b5dcb3ce6a1ec5222fc7a0420b3e1dc4c3a27e (diff)
Prepare for variable db file compression
-rwxr-xr-xdb-update1
-rw-r--r--test/lib/common.inc8
2 files changed, 5 insertions, 4 deletions
diff --git a/db-update b/db-update
index a08bee2..d08c96d 100755
--- a/db-update
+++ b/db-update
@@ -222,6 +222,7 @@ for current_arch in ${ARCHES[@]}; do
if ! /bin/cp "$WORKDIR/build/$reponame-$current_arch$DBEXT" "$ftppath/$reponame$DBEXT"; then
die "failed to move repository $reponame-$current_arch".
fi
+ ln -sf "$reponame$DBEXT" "$ftppath/$reponame${DBEXT%.tar.*}"
else
echo "Nothing to copy, no work done"
fi
diff --git a/test/lib/common.inc b/test/lib/common.inc
index 2d2b612..d28017d 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -89,7 +89,7 @@ checkAnyPackage() {
done
[ -f "${STAGING}"/${repo}/${pkg} ] && fail "${repo}/${pkg} found in staging dir"
- bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}.db.tar.gz" -O | grep -q ${pkg} || fail "${pkg} not in ${repo}/os/${arch}/${repo}.db.tar.gz"
+ bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q ${pkg} || fail "${pkg} not in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}"
[ -f "${FTP_BASE}/${repo}/os/any/${pkg}" ] && fail "${repo}/os/any/${pkg} should not exist"
}
@@ -105,7 +105,7 @@ checkPackage() {
[ "$(readlink -e "${FTP_BASE}/${repo}/os/${arch}/${pkg}")" == "${FTP_BASE}/packages/arch/${arch}/${pkg}" ] || fail "${repo}/os/${arch}/${pkg} does not link to packages/arch/${arch}/${pkg}"
- bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}.db.tar.gz" -O | grep -q ${pkg} || fail "${pkg} not in ${repo}/os/${arch}/${repo}.db.tar.gz"
+ bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q ${pkg} || fail "${pkg} not in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}"
local pkgbase=$(getpkgbase "${FTP_BASE}/packages/arch/${arch}/${pkg}")
svn up -q "${TMP}/svn-packages-copy/${pkgbase}"
@@ -117,7 +117,7 @@ checkRemovedPackage() {
local pkgbase=$2
local arch=$3
- bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}.db.tar.gz" -O | grep -q ${pkgbase} && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}.db.tar.gz"
+ bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q ${pkgbase} && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}"
svn up -q "${TMP}/svn-packages-copy/${pkgbase}"
[ -d "${TMP}/svn-packages-copy/${pkgbase}/repos/${repo}-${arch}" ] && fail "svn-packages-copy/${pkgbase}/repos/${repo}-${arch} should not exist"
@@ -129,7 +129,7 @@ checkRemovedAnyPackage() {
local arch
for arch in i686 x86_64; do
- bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}.db.tar.gz" -O | grep -q ${pkgbase} && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}.db.tar.gz"
+ bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q ${pkgbase} && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}"
done
svn up -q "${TMP}/svn-packages-copy/${pkgbase}"