diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-06 16:23:09 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-06 16:23:09 +0000 |
commit | b5cb27c1a76b48b4fa318d8f3cc53e675c77b2dc (patch) | |
tree | 721c064980dc58e727446ec52adc90aa06bed418 | |
parent | 6ba83cc929ebee34451906ecd6c704bd3724b31f (diff) | |
download | morph-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.
-rw-r--r-- | morphlib/builder.py | 4 |
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): |