summaryrefslogtreecommitdiffstats
path: root/test/pacman/tests/dbonly-extracted-files.py
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2016-12-06 07:30:42 +0100
committerAllan McRae <allan@archlinux.org>2017-01-04 04:59:14 +0100
commit2c4511bdbe3599713811e54edbbd60e51d66ce3e (patch)
tree0e50ae3da409690190eedb64d27e205f522b4ecc /test/pacman/tests/dbonly-extracted-files.py
parent1a2d5bee3bc8841f81db7a4d6b2d41a2363b93d6 (diff)
downloadpacman-2c4511bdbe3599713811e54edbbd60e51d66ce3e.tar.gz
pacman-2c4511bdbe3599713811e54edbbd60e51d66ce3e.tar.xz
extract db files with dbonly
Some database files (install, mtree, and changelog) are extracted directly from the package, but DBONLY was skipping extraction altogether, causing those files to be missing after the transaction. Fixes #52052 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/tests/dbonly-extracted-files.py')
-rw-r--r--test/pacman/tests/dbonly-extracted-files.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/pacman/tests/dbonly-extracted-files.py b/test/pacman/tests/dbonly-extracted-files.py
new file mode 100644
index 00000000..a1bc48df
--- /dev/null
+++ b/test/pacman/tests/dbonly-extracted-files.py
@@ -0,0 +1,16 @@
+import util
+import os.path
+
+self.description = "Install a package with dbonly"
+
+sp = pmpkg("foobar", "1-1")
+sp.files = ["bin/foobar"]
+sp.install['post_install'] = "echo foobar"
+self.addpkg2db("sync", sp)
+
+self.args = "-S --dbonly %s" % sp.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=foobar")
+self.addrule("FILE_EXIST=%s" % os.path.join(util.PM_DBPATH, "local/foobar-1-1/install"))
+self.addrule("!FILE_EXIST=bin/foobar")