diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-20 16:20:13 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-21 12:38:39 +0100 |
commit | 726b0a3858297aa3396054681af837640ffd5c92 (patch) | |
tree | c0bc5b9c465dbd12eeda4e45b8c0c8db2b84fdca /morphlib/builder2.py | |
parent | 1dfaa88a7e3f39d9479be25b60e27414e803f91b (diff) | |
download | morph-726b0a3858297aa3396054681af837640ffd5c92.tar.gz |
SystemBuilder: create a new artifact for kernel
The kernel should be considered a full artifact, not just metadata.
The rootfs is now suffixed by -rootfs and the kernel is named
$name-kernel. This is similar to how chunk splitting works.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r-- | morphlib/builder2.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index d11ba97b..3bc8bb10 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -435,7 +435,9 @@ class SystemBuilder(BuilderBase): # pragma: no cover arch = self.artifact.source.morphology['arch'] - handle = self.local_artifact_cache.put(self.artifact) + rootfs_artifact = self.new_artifact( + self.artifact.source.morphology['name'] + '-rootfs') + handle = self.local_artifact_cache.put(rootfs_artifact) image_name = handle.name self._create_image(image_name) @@ -461,13 +463,9 @@ class SystemBuilder(BuilderBase): # pragma: no cover if arch in ('x86', 'x86_64', None): self._install_extlinux(mount_point) if arch in ('arm',): - # write the kernel as metadata to the cache - # it should probably be a full artifact, but - # that would require altering the artifact - # resolver - lac = self.local_artifact_cache - a = self.artifact - with lac.put_artifact_metadata(a, 'kernel') as dest: + a = self.new_artifact( + self.artifact.source.morphology['name']+'-kernel') + with self.local_artifact_cache.put(a) as dest: with open(os.path.join(factory_path, 'boot', 'zImage')) as kernel: |