[pacman-dev] [PATCH 3/6] pmtest: allow tests to specify db version
Andrew Gregory
andrew.gregory.8 at gmail.com
Wed Oct 8 06:39:04 UTC 2014
Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
test/pacman/pmtest.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 09baac7..7ed30eb 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -37,6 +37,7 @@ def __init__(self, name, root):
self.name = name
self.testname = os.path.basename(name).replace('.py', '')
self.root = root
+ self.dbver = 9
self.cachepkgs = True
def __str__(self):
@@ -180,9 +181,9 @@ def generate(self, pacman):
for pkg in self.db["local"].pkgs:
vprint("\tinstalling %s" % pkg.fullname())
pkg.install_package(self.root)
- if self.db["local"].pkgs:
+ if self.db["local"].pkgs and self.dbver >= 9:
path = os.path.join(self.root, util.PM_DBPATH, "local")
- util.mkfile(path, "ALPM_DB_VERSION", "9")
+ util.mkfile(path, "ALPM_DB_VERSION", str(self.dbver))
# Done.
vprint(" Taking a snapshot of the file system")
--
2.1.2
More information about the pacman-dev
mailing list