diff options
-rwxr-xr-x | morph | 14 | ||||
-rw-r--r-- | morphlib/builder.py | 6 |
2 files changed, 12 insertions, 8 deletions
@@ -361,9 +361,10 @@ class Morph(cliapp.Application): tempdir = morphlib.tempdir.Tempdir(self.settings['tempdir']) morph_loader = MorphologyLoader(self.settings) - source_manager = morphlib.sourcemanager.SourceManager(self, update=False) + src_manager = morphlib.sourcemanager.SourceManager(self, update=False) factory = morphlib.builder.Factory(tempdir) - builder = morphlib.builder.Builder(tempdir, self, morph_loader, source_manager, factory) + builder = morphlib.builder.Builder(tempdir, self, morph_loader, + src_manager, factory) cachedir = morphlib.cachedir.CacheDir(self.settings['cachedir']) ex = morphlib.execute.Execute('.', self.msg) @@ -373,19 +374,20 @@ class Morph(cliapp.Application): paths = {} for name in ('source', 'target'): repo, ref, filename = trip_iter() - treeish = source_manager.get_treeish(repo, ref) + treeish = src_manager.get_treeish(repo, ref) morph = lorph_loader.load(treeish, filename) paths[name] = cachedir.name(builder.get_cache_id(morph)) try: for name in paths.iterkeys(): # mount the system images - partition = morphlib.fsutils.setup_device_mapping(ex, paths[name]) + part = morphlib.fsutils.setup_device_mapping(ex, paths[name]) mount_point = tempdir.join('mnt_' + name) - morphlib.fsutils.mount(ex, partition, mount_point) + morphlib.fsutils.mount(ex, part, mount_point) # make a diff - ex.runv(['tbdiff-create', outpath, paths['source'], paths['target']]) + ex.runv(['tbdiff-create', outpath, paths['source'], + paths['target']]) except BaseException: # cleanup diff --git a/morphlib/builder.py b/morphlib/builder.py index 6b7a9983..b822c61a 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -450,7 +450,8 @@ class SystemBuilder(BlobBuilder): # pragma: no cover def _create_image(self, image_name): with self.build_watch('create-image'): - morphlib.fsutils.create_image(self.ex, image_name, self.blob.morph.disk_size) + morphlib.fsutils.create_image(self.ex, image_name, + self.blob.morph.disk_size) def _partition_image(self, image_name): with self.build_watch('partition-image'): @@ -500,7 +501,8 @@ class SystemBuilder(BlobBuilder): # pragma: no cover f.write('timeout 1\n') f.write('label linux\n') f.write('kernel /boot/vmlinuz\n') - f.write('append root=/dev/sda1 rootflags=subvol=factory-run init=/sbin/init quiet rw\n') + f.write('append root=/dev/sda1 rootflags=subvol=factory-run ' + 'init=/sbin/init quiet rw\n') def _create_subvolume_snapshot(self, path, source, target): with self.build_watch('create-subvolume-snapshot'): |