self.destdir = "."
self.target_arch = "noarch"
self._local_pkgs_path = None
+
# If the kernel is save to the destdir when copy_kernel cmd is called.
- self._copy_kernel = False
+ self._need_copy_kernel = False
# Eeach image type can change these values as they might be image type
# specific
"arch" : "target_arch",
"local_pkgs_path" : "_local_pkgs_path",
"compress_disk_image" : "_img_compression_method",
- "copy_kernel" : "_copy_kernel",
+ "copy_kernel" : "_need_copy_kernel",
}
# update setting from createopts
""" Copy kernel files to the outimage directory.
NOTE: This needs to be called before unmounting the instroot.
-
"""
- if not self._copy_kernel:
+
+ if not self._need_copy_kernel:
return
+
if not os.path.exists(self.destdir):
os.makedirs(self.destdir)
+
for kernel in glob.glob("%s/boot/vmlinuz-*" % self._instroot):
kernelfilename = "%s/%s-%s" % (self.destdir, self.name, os.path.basename(kernel))
+ msger.info('copy kernel file %s as %s' % (os.path.basename(kernel), kernelfilename))
shutil.copy(kernel, kernelfilename)
self.outimage.append(kernelfilename)