summaryrefslogtreecommitdiffstats
path: root/test/pacman/pmtest.py
diff options
context:
space:
mode:
authorXavier Chantry <chantry.xavier@gmail.com>2010-10-11 01:05:04 +0200
committerDan McGee <dan@archlinux.org>2010-10-11 17:06:57 +0200
commitfa933df65b9e024ec3291fcc1f995be3dc000e0c (patch)
tree35854a375dc5c8bf62d13ca0758b91dba445f155 /test/pacman/pmtest.py
parent67068b64b9da96a0122591ede25c50ab307a1612 (diff)
downloadpacman-fa933df65b9e024ec3291fcc1f995be3dc000e0c.tar.gz
pacman-fa933df65b9e024ec3291fcc1f995be3dc000e0c.tar.xz
pactest: fix gensync
gensync generated a sync.db file with PKGINFO syntax, this is not quite what pacman expects. Also the file was only added to the Server path: root/var/pub/sync/sync.db but it was not available in the normal sync db path: root/var/lib/pacman/sync/sync.db Change gensync() to generate var/lib/pacman/sync/sync.db and then copy it to var/pub/sync/sync.db (this is used by sync200 -Sy test). Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test/pacman/pmtest.py')
-rwxr-xr-xtest/pacman/pmtest.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 5c8881c8..c4769298 100755
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -47,7 +47,7 @@ class pmtest:
"""
"""
if not treename in self.db:
- self.db[treename] = pmdb.pmdb(treename, os.path.join(self.root, PM_DBPATH))
+ self.db[treename] = pmdb.pmdb(treename, self.root)
self.db[treename].pkgs.append(pkg)
def addpkg(self, pkg):
@@ -73,7 +73,7 @@ class pmtest:
self.args = ""
self.retcode = 0
self.db = {
- "local": pmdb.pmdb("local", os.path.join(self.root, PM_DBPATH))
+ "local": pmdb.pmdb("local", self.root)
}
self.localpkgs = []
self.filesystem = []
@@ -152,9 +152,11 @@ class pmtest:
vprint(" Creating sync database archives")
for key, value in self.db.iteritems():
if key == "local": continue
- archive = value.treename + ".db"
- vprint("\t" + os.path.join(SYNCREPO, archive))
- value.gensync(os.path.join(syncdir, value.treename))
+ vprint("\t" + value.treename)
+ value.gensync()
+ serverpath = os.path.join(syncdir, value.treename)
+ mkdir(serverpath)
+ shutil.copy(value.dbfile, serverpath)
# Filesystem
vprint(" Populating file system")