summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins
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-18 11:47:06 +0000
commitaf8b00556e09253dac3cf75934e7719268abe198 (patch)
tree87818bd59c6ae5a13df88fdbb7a66079a0b23eda /scripts/lib/wic/plugins
parent2573e285d01106deaedea648f7c7566020721be7 (diff)
downloadpoky-af8b00556e09253dac3cf75934e7719268abe198.tar.gz
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>
Diffstat (limited to 'scripts/lib/wic/plugins')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py4
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py11
2 files changed, 8 insertions, 7 deletions
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):
46 """ 46 """
47 Create loader-specific (grub-efi) config 47 Create loader-specific (grub-efi) config
48 """ 48 """
49 configfile = kickstart.get_bootloader_file(creator.ks) 49 configfile = creator.ks.bootloader.configfile
50 custom_cfg = None 50 custom_cfg = None
51 if configfile: 51 if configfile:
52 custom_cfg = get_custom_config(configfile) 52 custom_cfg = get_custom_config(configfile)
@@ -104,7 +104,7 @@ class BootimgEFIPlugin(SourcePlugin):
104 cfg.write(loader_conf) 104 cfg.write(loader_conf)
105 cfg.close() 105 cfg.close()
106 106
107 configfile = kickstart.get_bootloader_file(creator.ks) 107 configfile = creator.ks.bootloader.configfile
108 custom_cfg = None 108 custom_cfg = None
109 if configfile: 109 if configfile:
110 custom_cfg = get_custom_config(configfile) 110 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):
84 install_cmd = "install -d %s" % hdddir 84 install_cmd = "install -d %s" % hdddir
85 exec_cmd(install_cmd) 85 exec_cmd(install_cmd)
86 86
87 configfile = kickstart.get_bootloader_file(creator.ks) 87 bootloader = creator.ks.bootloader
88
88 custom_cfg = None 89 custom_cfg = None
89 if configfile: 90 if bootloader.configfile:
90 custom_cfg = get_custom_config(configfile) 91 custom_cfg = get_custom_config(bootloader.configfile)
91 if custom_cfg: 92 if custom_cfg:
92 # Use a custom configuration for grub 93 # Use a custom configuration for grub
93 syslinux_conf = custom_cfg 94 syslinux_conf = custom_cfg
94 msger.debug("Using custom configuration file " 95 msger.debug("Using custom configuration file "
95 "%s for syslinux.cfg" % configfile) 96 "%s for syslinux.cfg" % bootloader.configfile)
96 else: 97 else:
97 msger.error("configfile is specified but failed to " 98 msger.error("configfile is specified but failed to "
98 "get it from %s." % configfile) 99 "get it from %s." % bootloader.configfile)
99 100
100 if not custom_cfg: 101 if not custom_cfg:
101 # Create syslinux configuration using parameters from wks file 102 # Create syslinux configuration using parameters from wks file