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>
This commit is contained in:
Andrew Gregory 2014-10-23 02:54:50 -04:00 committed by Allan McRae
parent 4114e25df1
commit 8cd41ec62b
1 changed files with 5 additions and 1 deletions

View File

@ -9,9 +9,13 @@
self.addpkg2db("local", fpkg)
self.dbver = 8
self.cmd = ["pacman-db-upgrade", "--root", self.root + "/"]
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/")