summaryrefslogtreecommitdiff
path: root/pactest/pmpkg.py
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-03-05 18:06:12 +0000
committerAaron Griffin <aaron@archlinux.org>2007-03-05 18:06:12 +0000
commit2caadb33bf60167401f7dd316e704bc42e32a1a9 (patch)
treed7c349246b591073b91a5b6635503cfafda3bd52 /pactest/pmpkg.py
parent714a414e72591f3273583cb4970e1515c94e5887 (diff)
downloadpacman-2caadb33bf60167401f7dd316e704bc42e32a1a9.tar.xz
* Fixed an issue with globbing the --test argument
* Added a custom 'mkdir' function which makes parents and doesn't fail on existence * Added output for 'SKIP' messages (it did not indicate WHY it was skipped) * Added the ability to generate DB packages in the sync dir (not the cache dir) for testing downloading. (self.cachepkgs = False) * Added pmtest.path for the full path to the package file
Diffstat (limited to 'pactest/pmpkg.py')
-rwxr-xr-xpactest/pmpkg.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pactest/pmpkg.py b/pactest/pmpkg.py
index b4c30c55..c302d2ae 100755
--- a/pactest/pmpkg.py
+++ b/pactest/pmpkg.py
@@ -33,6 +33,7 @@ class pmpkg:
"""
def __init__(self, name, version = "1.0-1"):
+ self.path = "" #the path of the generated package
# desc
self.name = name
self.version = version
@@ -116,7 +117,7 @@ class pmpkg:
A package archive is generated in the location 'path', based on the data
from the object.
"""
- archive = os.path.join(path, self.filename())
+ self.path = os.path.join(path, self.filename())
curdir = os.getcwd()
tmpdir = tempfile.mkdtemp()
@@ -172,8 +173,11 @@ class pmpkg:
os.system("touch .FILELIST")
targets += " .FILELIST"
+ #safely create the dir
+ mkdir(os.path.dirname(self.path))
+
# Generate package archive
- os.system("tar zcf %s %s" % (archive, targets))
+ os.system("tar zcf %s %s" % (self.path, targets))
os.chdir(curdir)
shutil.rmtree(tmpdir)