diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-10-17 20:22:44 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-10-17 20:22:44 +0100 |
commit | 0d62665119d13a113f92de18f918e850f4596f69 (patch) | |
tree | 0dcb7a9f31f645758d4f945c15e841e83474f1a5 /morphlib | |
parent | e55fece2655675ff4b151134fe5e0f222f4c8d70 (diff) | |
download | morph-0d62665119d13a113f92de18f918e850f4596f69.tar.gz |
Use morphlib.bins.create_chunk and unpack_chunk in builder.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/builder.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index bc51ab19..31c34b39 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -108,9 +108,9 @@ class Builder(object): ''' + logging.debug('Creating chunk %s' % morph.name) filename = self.get_cached_name(morph.name, 'chunk', repo, ref) - logging.debug('Creating chunk %s at %s' % (morph.name, filename)) - self.ex.runv(['tar', '-C', self._inst, '-czf', filename, '.']) + morphlib.bins.create_chunk(self._inst, filename) def build_stratum(self, morph): '''Build a stratum from a morphology.''' @@ -134,15 +134,12 @@ class Builder(object): (chunk_repo, chunk_ref)) filename = self.get_cached_name(chunk_name, 'chunk', chunk_repo, chunk_ref) - self.unpack_chunk(filename) + morphlib.bins.unpack_chunk(filename, self._inst) self.prepare_binary_metadata(morph) stratum_filename = self.create_stratum(morph) self.tempdir.clear() return stratum_filename - def unpack_chunk(self, filename): - self.ex.runv(['tar', '-C', self._inst, '-xf', filename]) - def create_stratum(self, morph): '''Create a Baserock stratum from the ``self._inst`` directory. |