summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-10-17 20:28:07 +0100
committerLars Wirzenius <liw@liw.fi>2011-10-17 20:28:07 +0100
commitac699d56f600ff7109af0bf1c7a3744c49ebc4b5 (patch)
tree1df7aaac90deace8fc513ee5ae23cd3bebafb4c4
parent7cba0a33cee244379cb2078b7c286c4de5c4f341 (diff)
downloadmorph-ac699d56f600ff7109af0bf1c7a3744c49ebc4b5.tar.gz
Use create_stratum and unpack_stratum helper functions.
-rw-r--r--morphlib/builder.py6
-rw-r--r--tests/hello-stratum.stdout12
2 files changed, 8 insertions, 10 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 31c34b39..c5d1cb8c 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -150,7 +150,7 @@ class Builder(object):
# FIXME: Should put in stratum's git repo and reference here.
filename = self.get_cached_name(morph.name, 'stratum', '', '')
self.msg('Creating stratum %s at %s' % (morph.name, filename))
- self.ex.runv(['tar', '-C', self._inst, '-czf', filename, '.'])
+ morphlib.bins.create_stratum(self._inst, filename)
return filename
@property
@@ -285,9 +285,7 @@ class Builder(object):
# Unpack all strata into filesystem.
for filename in stratum_filenames:
- self.msg('Unpacking stratum %s' % filename)
- self.ex.runv(['tar', '-C', mount_point, '-xf', filename],
- as_root=True)
+ morphlib.bins.unpack_stratum(filename, mount_point)
# Create fstab.
fstab = self.tempdir.join('mnt/etc/fstab')
diff --git a/tests/hello-stratum.stdout b/tests/hello-stratum.stdout
index b6fe5f67..c87d9b5c 100644
--- a/tests/hello-stratum.stdout
+++ b/tests/hello-stratum.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