diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-07-15 22:47:19 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-10-07 18:15:03 -0400 |
commit | 6ea24d6e2e429b5b101e9943dbe60af7ab986ae2 (patch) | |
tree | 8095791f96aca72dd671cefc1ae5babc87f33766 | |
parent | 54dba5837495e03fe45862c8c946e7d0cf19403f (diff) |
test: db-remove: Verify that it accepts pkgname (in addition to pkgbase)
It is important that db-remove be able to remove a single pkgname, without
being able to look it up by pkgbase in SVN. For instance, when a split
package update removes one of its members; there will be no reference to
the removed pkgname in SVN, and it won't be removed by db-update. If
db-remove doesn't accept pkgnames, then this outdated orphan could not be
removed.
-rw-r--r-- | test/cases/db-remove.bats | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/cases/db-remove.bats b/test/cases/db-remove.bats index fe373bc..6853ee7 100644 --- a/test/cases/db-remove.bats +++ b/test/cases/db-remove.bats @@ -44,6 +44,21 @@ load ../lib/common done } +@test "remove partial split package" { + local arches=('i686' 'x86_64') + local arch + + releasePackage extra pkg-split-a + db-update + + for arch in ${arches[@]}; do + db-remove extra "${arch}" pkg-split-a1 + done + + if bsdtar xfO "$FTP_BASE/extra/os/x86_64/extra.db" pkg-split-a1-1-1/desc >/dev/null; then return 1; fi + bsdtar xfO "$FTP_BASE/extra/os/x86_64/extra.db" pkg-split-a2-1-1/desc >/dev/null +} + @test "remove any packages" { local pkgs=('pkg-any-a' 'pkg-any-b') local pkgbase |