summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-06 16:23:09 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-12-06 16:23:09 +0000
commitb5cb27c1a76b48b4fa318d8f3cc53e675c77b2dc (patch)
tree721c064980dc58e727446ec52adc90aa06bed418 /morphlib
parent6ba83cc929ebee34451906ecd6c704bd3724b31f (diff)
downloadmorph-b5cb27c1a76b48b4fa318d8f3cc53e675c77b2dc.tar.gz
use tar command instead of Python's tarlib
This saves a bunch of memory. tar seems to be much more efficient than tarlib, for extracting.
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/builder.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index d670bb94..cffac2ec 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -187,9 +187,7 @@ class Chunk(BinaryBlob):
morphlib.git.export_sources(self.repo, self.ref, tarball)
self.dump_memory_profile('after exporting sources')
os.mkdir(self.builddir)
- f = tarfile.open(tarball)
- f.extractall(path=self.builddir)
- f.close()
+ self.ex.runv(['tar', '-C', self.builddir, '-xf', tarball])
self.dump_memory_profile('after creating source and tarball for chunk')
def build_using_buildsystem(self):