From 2caadb33bf60167401f7dd316e704bc42e32a1a9 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 5 Mar 2007 18:06:12 +0000 Subject: * 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 --- pactest/pmpkg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pactest/pmpkg.py') 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) -- cgit v1.2.3-24-g4f1b