index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2007-03-05 18:06:12 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-03-05 18:06:12 +0000 |
commit | 2caadb33bf60167401f7dd316e704bc42e32a1a9 (patch) | |
tree | d7c349246b591073b91a5b6635503cfafda3bd52 /pactest/pmpkg.py | |
parent | 714a414e72591f3273583cb4970e1515c94e5887 (diff) |
-rwxr-xr-x | pactest/pmpkg.py | 8 |
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) |