summaryrefslogtreecommitdiffstats
path: root/test/pacman
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2016-12-06 07:30:42 +0100
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-09 05:27:45 +0200
commit831cc8d9cd51921370e20befa4672f232ea2fbdf (patch)
treee5bf983016e9815f3ce13c651cae1f18d916e705 /test/pacman
parente708b606ae480eb09827a699aefb4bd85ee342e2 (diff)
downloadpacman-831cc8d9cd51921370e20befa4672f232ea2fbdf.tar.gz
pacman-831cc8d9cd51921370e20befa4672f232ea2fbdf.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> (cherry picked from commit 2c4511bdbe3599713811e54edbbd60e51d66ce3e)
Diffstat (limited to 'test/pacman')
-rw-r--r--test/pacman/tests/TESTS1
-rw-r--r--test/pacman/tests/dbonly-extracted-files.py16
2 files changed, 17 insertions, 0 deletions
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index 9da24589..0344a536 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -11,6 +11,7 @@ TESTS += test/pacman/tests/database002.py
TESTS += test/pacman/tests/database010.py
TESTS += test/pacman/tests/database011.py
TESTS += test/pacman/tests/database012.py
+TESTS += test/pacman/tests/dbonly-extracted-files.py
TESTS += test/pacman/tests/depconflict100.py
TESTS += test/pacman/tests/depconflict110.py
TESTS += test/pacman/tests/depconflict111.py
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")