summaryrefslogtreecommitdiffstats
path: root/test/pacman/pmtest.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-24 04:35:32 +0200
committerDan McGee <dan@archlinux.org>2011-06-30 18:55:00 +0200
commit0ed848a9ea7a543192cef1ca78695a9046ee4e98 (patch)
tree195bba351892afdd328adf397607f74648850d24 /test/pacman/pmtest.py
parent13235ba65ab55d852dbdc0acabdc047442e74e28 (diff)
downloadpacman-0ed848a9ea7a543192cef1ca78695a9046ee4e98.tar.gz
pacman-0ed848a9ea7a543192cef1ca78695a9046ee4e98.tar.xz
pactest: create packages in memory
This is similar to what was just done for the sync databases. Move a few pieces around so we never need to actually write out the filesystem to create a package, and simply stream the tarfile out from the data we've collected. Once again, a few newline addition hacks and other things have to be left in place in order not to break everything; this time however most of the assumptions are in pactest and not libalpm. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test/pacman/pmtest.py')
-rw-r--r--test/pacman/pmtest.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 3f78ff92..e38d3a66 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -156,16 +156,11 @@ class pmtest(object):
vprint(" Populating file system")
for pkg in self.db["local"].pkgs:
vprint("\tinstalling %s" % pkg.fullname())
- for f in pkg.files:
- vprint("\t%s" % f)
- path = os.path.join(self.root, f)
- util.mkfile(path, f)
- if os.path.isfile(path):
- os.utime(path, (355, 355))
+ pkg.install_package(self.root)
for f in self.filesystem:
vprint("\t%s" % f)
+ util.mkfile(self.root, f, f)
path = os.path.join(self.root, f)
- util.mkfile(path, f)
if os.path.isfile(path):
os.utime(path, (355, 355))