summaryrefslogtreecommitdiff
path: root/pactest/pmdb.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-04-19 16:18:40 -0500
committerDan McGee <dan@archlinux.org>2008-04-19 16:18:40 -0500
commit423820b34c018e655aac5836873fef8dc475bd74 (patch)
tree690c72ae87a207870b9b0eaa6eec130de8978d37 /pactest/pmdb.py
parent7a873a8f1284058c968c5d8026fbde7867913cb5 (diff)
parentc465d9e848b19b495259c7021a583c29fba92b44 (diff)
Merge branch 'maint'
Conflicts: pactest/pmtest.py
Diffstat (limited to 'pactest/pmdb.py')
-rwxr-xr-xpactest/pmdb.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pactest/pmdb.py b/pactest/pmdb.py
index e0f328ef..cfa146bd 100755
--- a/pactest/pmdb.py
+++ b/pactest/pmdb.py
@@ -19,6 +19,7 @@
import os
import tempfile
import shutil
+import tarfile
import pmpkg
from util import *
@@ -343,7 +344,13 @@ class pmdb:
# Generate database archive
mkdir(path)
archive = os.path.join(path, "%s%s" % (self.treename, PM_EXT_DB))
- os.system("tar zcf %s *" % archive)
+ tar = tarfile.open(archive, "w:gz")
+ for root, dirs, files in os.walk('.'):
+ for d in dirs:
+ tar.add(os.path.join(root, d), recursive=False)
+ for f in files:
+ tar.add(os.path.join(root, f))
+ tar.close()
os.chdir(curdir)
shutil.rmtree(tmpdir)