diff options
-rw-r--r-- | morphlib/builder.py | 9 | ||||
-rw-r--r-- | tests/hello-chunk.stdout | 12 |
2 files changed, 9 insertions, 12 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. diff --git a/tests/hello-chunk.stdout b/tests/hello-chunk.stdout index b6fe5f67..c87d9b5c 100644 --- a/tests/hello-chunk.stdout +++ b/tests/hello-chunk.stdout @@ -1,7 +1,7 @@ ./ -./baserock/ -./baserock/hello.meta -./usr/ -./usr/local/ -./usr/local/bin/ -./usr/local/bin/greeter +baserock/ +baserock/hello.meta +usr/ +usr/local/ +usr/local/bin/ +usr/local/bin/greeter |