summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-14 14:12:59 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-17 11:32:19 +0000
commitd34dd190e1da00ca8c9b2cb0adba15b9f0de2920 (patch)
tree85fbe23927994c9b0a689c3a4210ea2c8d05be11 /scripts/lib
parent7cf236047fa5d0d947fd214181c9a63ccb2509ac (diff)
downloadopenembedded-core-d34dd190e1da00ca8c9b2cb0adba15b9f0de2920.tar.gz
openembedded-core-d34dd190e1da00ca8c9b2cb0adba15b9f0de2920.tar.bz2
openembedded-core-d34dd190e1da00ca8c9b2cb0adba15b9f0de2920.zip
wic: get rid of 2 getters
Used partitions and configfile bootloader attributes instead of using getters get_bootloader_file and get_partitions. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/wic/imager/direct.py2
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py4
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py11
3 files changed, 9 insertions, 8 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 09ff5f828d..8d4daece0d 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -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
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 8bfa3a96ce..22f981389e 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -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)
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index e84bddf15d..0b5478ee6c 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -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