1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
pacman/test/scripts/pacman-db-upgrade-v9.py
Andrew Gregory 8cd41ec62b tests/pacman-db-upgrade-v9: set additional paths
--config does not respect root, causing pacman-db-upgrade to read the
local pacman.conf rather than the one in the test root.

Also add a rule to ensure the ALPM_DB_VERSION file is actually being
created.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04 20:11:18 +10:00

26 lines
908 B
Python

self.description = "pacman-db-upgrade DB version 9 (symlink support removal)"
self.filesystem = [ "mnt_real/subdir/", "mnt -> mnt_real/subdir/", "bar -> ./" ]
fpkg = pmpkg("filesystem")
fpkg.files = ["mnt_real/", "mnt/", "mnt/foo", "bar/", "bar/baz"]
fpkg.backup = ["mnt/foo"]
self.addpkg2db("local", fpkg)
self.dbver = 8
self.cmd = ["pacman-db-upgrade",
"--root", self.rootdir(),
"--dbpath", self.dbdir(),
"--config", self.configfile() ]
self.addrule("PACMAN_RETCODE=0")
self.addrule("FILE_EXIST=var/lib/pacman/local/ALPM_DB_VERSION")
self.addrule("PKG_BACKUP=filesystem|mnt_real/subdir/foo")
self.addrule("PKG_FILES=filesystem|mnt_real/")
self.addrule("PKG_FILES=filesystem|mnt_real/subdir/")
self.addrule("PKG_FILES=filesystem|mnt_real/subdir/foo")
self.addrule("PKG_FILES=filesystem|baz")
self.addrule("!PKG_FILES=filesystem|mnt/")
self.addrule("!PKG_FILES=filesystem|bar/")