mirror of
https://git.yoctoproject.org/poky
synced 2026-02-27 03:49:41 +01:00
wic: get rid of 2 getters
Used partitions and configfile bootloader attributes instead of using getters get_bootloader_file and get_partitions. (From OE-Core rev: d34dd190e1da00ca8c9b2cb0adba15b9f0de2920) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2573e285d0
commit
af8b00556e
@@ -159,7 +159,7 @@ class DirectImageCreator(BaseImageCreator):
|
||||
self.ks.partitions.append(part)
|
||||
|
||||
# partitions list from kickstart file
|
||||
return kickstart.get_partitions(self.ks)
|
||||
return self.ks.partitions
|
||||
|
||||
def get_disk_names(self):
|
||||
""" Returns a list of physical target disk names (e.g., 'sdb') which
|
||||
|
||||
@@ -46,7 +46,7 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||
"""
|
||||
Create loader-specific (grub-efi) config
|
||||
"""
|
||||
configfile = kickstart.get_bootloader_file(creator.ks)
|
||||
configfile = creator.ks.bootloader.configfile
|
||||
custom_cfg = None
|
||||
if configfile:
|
||||
custom_cfg = get_custom_config(configfile)
|
||||
@@ -104,7 +104,7 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||
cfg.write(loader_conf)
|
||||
cfg.close()
|
||||
|
||||
configfile = kickstart.get_bootloader_file(creator.ks)
|
||||
configfile = creator.ks.bootloader.configfile
|
||||
custom_cfg = None
|
||||
if configfile:
|
||||
custom_cfg = get_custom_config(configfile)
|
||||
|
||||
@@ -84,18 +84,19 @@ class BootimgPcbiosPlugin(SourcePlugin):
|
||||
install_cmd = "install -d %s" % hdddir
|
||||
exec_cmd(install_cmd)
|
||||
|
||||
configfile = kickstart.get_bootloader_file(creator.ks)
|
||||
bootloader = creator.ks.bootloader
|
||||
|
||||
custom_cfg = None
|
||||
if configfile:
|
||||
custom_cfg = get_custom_config(configfile)
|
||||
if bootloader.configfile:
|
||||
custom_cfg = get_custom_config(bootloader.configfile)
|
||||
if custom_cfg:
|
||||
# Use a custom configuration for grub
|
||||
syslinux_conf = custom_cfg
|
||||
msger.debug("Using custom configuration file "
|
||||
"%s for syslinux.cfg" % configfile)
|
||||
"%s for syslinux.cfg" % bootloader.configfile)
|
||||
else:
|
||||
msger.error("configfile is specified but failed to "
|
||||
"get it from %s." % configfile)
|
||||
"get it from %s." % bootloader.configfile)
|
||||
|
||||
if not custom_cfg:
|
||||
# Create syslinux configuration using parameters from wks file
|
||||
|
||||
Reference in New Issue
Block a user