On Thu, May 29, 2014 at 05:49:40PM +0100, Richard Ipsum wrote:
---
morphlib/writeexts.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/morphlib/writeexts.py b/morphlib/writeexts.py
index b4912db..1d72554 100644
--- a/morphlib/writeexts.py
+++ b/morphlib/writeexts.py
@@ -121,6 +121,11 @@ class WriteExtension(cliapp.Application):
try:
self.create_btrfs_system_layout(
temp_root, mp, version_label='factory')
+
+ kernel_path = os.environ.get('KERNEL')
+
+ if kernel_path:
+ self.write_kernel_image(temp_root, kernel_path)
This treats `KERNEL: ''` and an absent option as the same.
Granted, it probably wouldn't make sense to use most of those options,
but I'd rather odd inputs be treated as errors rather than the same as
being absent.
So I'd prefer:
if 'KERNEL' in os.environ:
self.write_kernel_image(temp_root, os.environ['KERNEL'])
However, it's not a big problem, and I don't mind it in its current
state too much.