summaryrefslogtreecommitdiff
path: root/test/pacman
diff options
context:
space:
mode:
Diffstat (limited to 'test/pacman')
-rw-r--r--test/pacman/pmpkg.py3
-rw-r--r--test/pacman/pmtest.py3
-rw-r--r--test/pacman/util.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 31336610..9033dc61 100644
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -174,8 +174,7 @@ class pmpkg(object):
def install_package(self, root):
"""Install the package in the given root."""
for f in self.files:
- util.mkfile(root, f, f)
- path = os.path.join(root, f)
+ path = util.mkfile(root, f, f)
if os.path.isfile(path):
os.utime(path, (355, 355))
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index d48c03f1..7774a7bf 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -180,8 +180,7 @@ class pmtest(object):
vprint(" Populating file system")
for f in self.filesystem:
vprint("\t%s" % f)
- util.mkfile(self.root, f, f)
- path = os.path.join(self.root, f)
+ path = util.mkfile(self.root, f, f)
if os.path.isfile(path):
os.utime(path, (355, 355))
for pkg in self.db["local"].pkgs:
diff --git a/test/pacman/util.py b/test/pacman/util.py
index aa9c63f7..e2acc52f 100644
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -84,7 +84,7 @@ def mkfile(base, name, data=""):
if info["isdir"]:
if not os.path.isdir(path):
os.makedirs(path, 0o755)
- return
+ return path
dir_path = os.path.dirname(path)
if dir_path and not os.path.isdir(dir_path):
@@ -98,6 +98,8 @@ def mkfile(base, name, data=""):
if info["perms"]:
os.chmod(path, info["perms"])
+ return path
+
def writedata(filename, data):
if isinstance(data, list):
data = "\n".join(data)