diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-09-10 10:15:43 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2014-09-17 15:51:10 +0000 |
commit | 37d91b2d42421c6ebc3c54ec79015fc07426a267 (patch) | |
tree | 3746deb284afb9c855566f9fbba6949a460b3f80 /morphlib | |
parent | 3703324d322e4ae8c2e061d524a37bb20e00f41b (diff) | |
download | morph-37d91b2d42421c6ebc3c54ec79015fc07426a267.tar.gz |
Stop creating a separate -kernel artifact for systems
This pre-dates deployment, and if we need the kernel, we can always copy
it out of the rootfs.
It also uses new_artifact, which is a method I want to remove.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/builder2.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index c1a49221..8031f26f 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -616,7 +616,6 @@ class SystemBuilder(BuilderBase): # pragma: no cover self.unpack_strata(fs_root) self.write_metadata(fs_root, rootfs_name) self.run_system_integration_commands(fs_root) - self.copy_kernel_into_artifact_cache(fs_root) unslashy_root = fs_root[1:] def uproot_info(info): info.name = relpath(info.name, unslashy_root) @@ -766,25 +765,6 @@ class SystemBuilder(BuilderBase): # pragma: no cover % mount_path) morphlib.fsutils.unmount(self.app.runcmd, mount_path) - def copy_kernel_into_artifact_cache(self, path): - '''Copy the installed kernel image into the local artifact cache. - - The kernel image will be a separate artifact from the root - filesystem/disk image/whatever. This is sometimes useful with - funky bootloaders or virtualisation. - - ''' - - name = self.artifact.source.morphology['name'] + '-kernel' - a = self.new_artifact(name) - with self.local_artifact_cache.put(a) as dest: - for basename in ['zImage', 'vmlinuz']: - installed_path = os.path.join(path, 'boot', basename) - if os.path.exists(installed_path): - with open(installed_path) as kernel: - shutil.copyfileobj(kernel, dest) - break - class Builder(object): # pragma: no cover |