diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-04-17 03:19:17 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-04-17 03:19:17 -0300 |
commit | d246da4bb04eee35189c79c8466c21ff86678e42 (patch) | |
tree | c7167129c67a2d846adcca9245ebae134069aa8a /test/test.d/ftpdir-cleanup.sh | |
parent | 6ce3ddee58415e052ec578e777994a60c7e4c3a3 (diff) | |
parent | 1ce0c6368d0908e25f9bd1bb8183b5f29053fac8 (diff) |
Merge branch 'master' of https://projects.archlinux.org/git/dbscripts
Conflicts:
db-functions
Diffstat (limited to 'test/test.d/ftpdir-cleanup.sh')
-rwxr-xr-x | test/test.d/ftpdir-cleanup.sh | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh index e9b977b..77b02b8 100755 --- a/test/test.d/ftpdir-cleanup.sh +++ b/test/test.d/ftpdir-cleanup.sh @@ -34,6 +34,34 @@ testCleanupSimplePackages() { done } +testCleanupEpochPackages() { + local arches=('i686' 'x86_64') + local pkgs=('pkg-simple-epoch') + local pkgbase + local arch + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + releasePackage extra ${pkgbase} ${arch} + done + done + + ../db-update + + for arch in ${arches[@]}; do + ../db-remove pkg-simple-epoch extra ${arch} + done + + ../cron-jobs/ftpdir-cleanup >/dev/null + + for arch in ${arches[@]}; do + local pkg1="pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" + checkRemovedPackage extra 'pkg-simple-epoch' ${arch} + [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found" + [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found" + done +} + testCleanupAnyPackages() { local pkgs=('pkg-any-a' 'pkg-any-b') local pkgbase @@ -78,13 +106,13 @@ testCleanupSplitPackages() { ../cron-jobs/ftpdir-cleanup >/dev/null for arch in ${arches[@]}; do - for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}.pkg.tar.*; do + for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${PKGEXT}; do checkRemovedPackage extra ${pkgs[0]} ${arch} [ -f "${FTP_BASE}/${PKGPOOL}/${pkg}" ] && fail "${PKGPOOL}/${pkg} found" [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg}" ] && fail "${repo}/os/${arch}/${pkg} found" done - for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}.pkg.tar.*; do + for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}${PKGEXT}; do checkPackage extra $(basename ${pkg}) ${arch} done done |