1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-15 13:55:09 -05:00

pmtest: install filesystem entries before packages

Installing filesystem entries first allows the filesystem to provide
a symlink to a directory.  Packages will then be able to use the symlink
as if it were a directory instead of causing an error.

For example:

self.filesystem = ["dir/", "link -> dir/"]
pkg = pmpkg("pkg1")
pkg.files = ["link/file"]
self.addpkg2db("local", pkg)

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 2013-02-13 17:06:25 -05:00 committed by Allan McRae
parent bc747fbfbf
commit 8803ae3b4d

View File

@ -168,15 +168,15 @@ class pmtest(object):
# Filesystem # Filesystem
vprint(" Populating file system") vprint(" Populating file system")
for pkg in self.db["local"].pkgs:
vprint("\tinstalling %s" % pkg.fullname())
pkg.install_package(self.root)
for f in self.filesystem: for f in self.filesystem:
vprint("\t%s" % f) vprint("\t%s" % f)
util.mkfile(self.root, f, f) util.mkfile(self.root, f, f)
path = os.path.join(self.root, f) path = os.path.join(self.root, f)
if os.path.isfile(path): if os.path.isfile(path):
os.utime(path, (355, 355)) os.utime(path, (355, 355))
for pkg in self.db["local"].pkgs:
vprint("\tinstalling %s" % pkg.fullname())
pkg.install_package(self.root)
# Done. # Done.
vprint(" Taking a snapshot of the file system") vprint(" Taking a snapshot of the file system")