summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-07-16 21:48:38 +1000
committerAllan McRae <allan@archlinux.org>2014-09-23 21:27:11 +1000
commit1660ed3cf9069f84d96670b5443a9f1542b7865d (patch)
treedcead4ae0bc06c4c2ea2a15d0aedf793f79071b6 /test
parent7e9ad22ac21329adcf470bb00f2d0a386376fddf (diff)
downloadpacman-1660ed3cf9069f84d96670b5443a9f1542b7865d.tar.xz
Add version file to empty local database
If a user manually creates the local database directory, or has an empty local database for some other reason, we silently add a version file Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/pmtest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 78b9e2d1..75a28d27 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -180,6 +180,9 @@ class pmtest(object):
for pkg in self.db["local"].pkgs:
vprint("\tinstalling %s" % pkg.fullname())
pkg.install_package(self.root)
+ if self.db["local"].pkgs:
+ path = os.path.join(self.root, util.PM_DBPATH, "local")
+ util.mkfile(path, ".alpm_db_version", "9")
# Done.
vprint(" Taking a snapshot of the file system")