summaryrefslogtreecommitdiffstats
path: root/meta/classes/grub-efi.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/grub-efi.bbclass
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/grub-efi.bbclass')
-rw-r--r--meta/classes/grub-efi.bbclass22
1 files changed, 11 insertions, 11 deletions
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 17417ba5d9..3dc9146d90 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -72,14 +72,14 @@ efi_hddimg_populate() {
72python build_efi_cfg() { 72python build_efi_cfg() {
73 import sys 73 import sys
74 74
75 workdir = d.getVar('WORKDIR', True) 75 workdir = d.getVar('WORKDIR')
76 if not workdir: 76 if not workdir:
77 bb.error("WORKDIR not defined, unable to package") 77 bb.error("WORKDIR not defined, unable to package")
78 return 78 return
79 79
80 gfxserial = d.getVar('GRUB_GFXSERIAL', True) or "" 80 gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
81 81
82 labels = d.getVar('LABELS', True) 82 labels = d.getVar('LABELS')
83 if not labels: 83 if not labels:
84 bb.debug(1, "LABELS not defined, nothing to do") 84 bb.debug(1, "LABELS not defined, nothing to do")
85 return 85 return
@@ -88,7 +88,7 @@ python build_efi_cfg() {
88 bb.debug(1, "No labels, nothing to do") 88 bb.debug(1, "No labels, nothing to do")
89 return 89 return
90 90
91 cfile = d.getVar('GRUB_CFG', True) 91 cfile = d.getVar('GRUB_CFG')
92 if not cfile: 92 if not cfile:
93 bb.fatal('Unable to read GRUB_CFG') 93 bb.fatal('Unable to read GRUB_CFG')
94 94
@@ -99,33 +99,33 @@ python build_efi_cfg() {
99 99
100 cfgfile.write('# Automatically created by OE\n') 100 cfgfile.write('# Automatically created by OE\n')
101 101
102 opts = d.getVar('GRUB_OPTS', True) 102 opts = d.getVar('GRUB_OPTS')
103 if opts: 103 if opts:
104 for opt in opts.split(';'): 104 for opt in opts.split(';'):
105 cfgfile.write('%s\n' % opt) 105 cfgfile.write('%s\n' % opt)
106 106
107 cfgfile.write('default=%s\n' % (labels.split()[0])) 107 cfgfile.write('default=%s\n' % (labels.split()[0]))
108 108
109 timeout = d.getVar('GRUB_TIMEOUT', True) 109 timeout = d.getVar('GRUB_TIMEOUT')
110 if timeout: 110 if timeout:
111 cfgfile.write('timeout=%s\n' % timeout) 111 cfgfile.write('timeout=%s\n' % timeout)
112 else: 112 else:
113 cfgfile.write('timeout=50\n') 113 cfgfile.write('timeout=50\n')
114 114
115 root = d.getVar('GRUB_ROOT', True) 115 root = d.getVar('GRUB_ROOT')
116 if not root: 116 if not root:
117 bb.fatal('GRUB_ROOT not defined') 117 bb.fatal('GRUB_ROOT not defined')
118 118
119 if gfxserial == "1": 119 if gfxserial == "1":
120 btypes = [ [ " graphics console", "" ], 120 btypes = [ [ " graphics console", "" ],
121 [ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ] 121 [ " serial console", d.getVar('GRUB_SERIAL') or "" ] ]
122 else: 122 else:
123 btypes = [ [ "", "" ] ] 123 btypes = [ [ "", "" ] ]
124 124
125 for label in labels.split(): 125 for label in labels.split():
126 localdata = d.createCopy() 126 localdata = d.createCopy()
127 127
128 overrides = localdata.getVar('OVERRIDES', True) 128 overrides = localdata.getVar('OVERRIDES')
129 if not overrides: 129 if not overrides:
130 bb.fatal('OVERRIDES not defined') 130 bb.fatal('OVERRIDES not defined')
131 131
@@ -141,8 +141,8 @@ python build_efi_cfg() {
141 141
142 cfgfile.write(' %s' % replace_rootfs_uuid(d, root)) 142 cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
143 143
144 append = localdata.getVar('APPEND', True) 144 append = localdata.getVar('APPEND')
145 initrd = localdata.getVar('INITRD', True) 145 initrd = localdata.getVar('INITRD')
146 146
147 if append: 147 if append:
148 append = replace_rootfs_uuid(d, append) 148 append = replace_rootfs_uuid(d, append)