summaryrefslogtreecommitdiffstats
path: root/meta/classes/syslinux.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/syslinux.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/syslinux.bbclass')
-rw-r--r--meta/classes/syslinux.bbclass34
1 files changed, 17 insertions, 17 deletions
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 7778fd708f..d8859b35bd 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -84,12 +84,12 @@ python build_syslinux_cfg () {
84 import copy 84 import copy
85 import sys 85 import sys
86 86
87 workdir = d.getVar('WORKDIR', True) 87 workdir = d.getVar('WORKDIR')
88 if not workdir: 88 if not workdir:
89 bb.error("WORKDIR not defined, unable to package") 89 bb.error("WORKDIR not defined, unable to package")
90 return 90 return
91 91
92 labels = d.getVar('LABELS', True) 92 labels = d.getVar('LABELS')
93 if not labels: 93 if not labels:
94 bb.debug(1, "LABELS not defined, nothing to do") 94 bb.debug(1, "LABELS not defined, nothing to do")
95 return 95 return
@@ -98,7 +98,7 @@ python build_syslinux_cfg () {
98 bb.debug(1, "No labels, nothing to do") 98 bb.debug(1, "No labels, nothing to do")
99 return 99 return
100 100
101 cfile = d.getVar('SYSLINUX_CFG', True) 101 cfile = d.getVar('SYSLINUX_CFG')
102 if not cfile: 102 if not cfile:
103 bb.fatal('Unable to read SYSLINUX_CFG') 103 bb.fatal('Unable to read SYSLINUX_CFG')
104 104
@@ -109,39 +109,39 @@ python build_syslinux_cfg () {
109 109
110 cfgfile.write('# Automatically created by OE\n') 110 cfgfile.write('# Automatically created by OE\n')
111 111
112 opts = d.getVar('SYSLINUX_OPTS', True) 112 opts = d.getVar('SYSLINUX_OPTS')
113 113
114 if opts: 114 if opts:
115 for opt in opts.split(';'): 115 for opt in opts.split(';'):
116 cfgfile.write('%s\n' % opt) 116 cfgfile.write('%s\n' % opt)
117 117
118 allowoptions = d.getVar('SYSLINUX_ALLOWOPTIONS', True) 118 allowoptions = d.getVar('SYSLINUX_ALLOWOPTIONS')
119 if allowoptions: 119 if allowoptions:
120 cfgfile.write('ALLOWOPTIONS %s\n' % allowoptions) 120 cfgfile.write('ALLOWOPTIONS %s\n' % allowoptions)
121 else: 121 else:
122 cfgfile.write('ALLOWOPTIONS 1\n') 122 cfgfile.write('ALLOWOPTIONS 1\n')
123 123
124 syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE', True) 124 syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE')
125 syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY', True) 125 syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY')
126 syslinux_serial = d.getVar('SYSLINUX_SERIAL', True) 126 syslinux_serial = d.getVar('SYSLINUX_SERIAL')
127 if syslinux_serial: 127 if syslinux_serial:
128 cfgfile.write('SERIAL %s\n' % syslinux_serial) 128 cfgfile.write('SERIAL %s\n' % syslinux_serial)
129 129
130 menu = (d.getVar('AUTO_SYSLINUXMENU', True) == "1") 130 menu = (d.getVar('AUTO_SYSLINUXMENU') == "1")
131 131
132 if menu and syslinux_serial: 132 if menu and syslinux_serial:
133 cfgfile.write('DEFAULT Graphics console %s\n' % (labels.split()[0])) 133 cfgfile.write('DEFAULT Graphics console %s\n' % (labels.split()[0]))
134 else: 134 else:
135 cfgfile.write('DEFAULT %s\n' % (labels.split()[0])) 135 cfgfile.write('DEFAULT %s\n' % (labels.split()[0]))
136 136
137 timeout = d.getVar('SYSLINUX_TIMEOUT', True) 137 timeout = d.getVar('SYSLINUX_TIMEOUT')
138 138
139 if timeout: 139 if timeout:
140 cfgfile.write('TIMEOUT %s\n' % timeout) 140 cfgfile.write('TIMEOUT %s\n' % timeout)
141 else: 141 else:
142 cfgfile.write('TIMEOUT 50\n') 142 cfgfile.write('TIMEOUT 50\n')
143 143
144 prompt = d.getVar('SYSLINUX_PROMPT', True) 144 prompt = d.getVar('SYSLINUX_PROMPT')
145 if prompt: 145 if prompt:
146 cfgfile.write('PROMPT %s\n' % prompt) 146 cfgfile.write('PROMPT %s\n' % prompt)
147 else: 147 else:
@@ -151,14 +151,14 @@ python build_syslinux_cfg () {
151 cfgfile.write('ui vesamenu.c32\n') 151 cfgfile.write('ui vesamenu.c32\n')
152 cfgfile.write('menu title Select kernel options and boot kernel\n') 152 cfgfile.write('menu title Select kernel options and boot kernel\n')
153 cfgfile.write('menu tabmsg Press [Tab] to edit, [Return] to select\n') 153 cfgfile.write('menu tabmsg Press [Tab] to edit, [Return] to select\n')
154 splash = d.getVar('SYSLINUX_SPLASH', True) 154 splash = d.getVar('SYSLINUX_SPLASH')
155 if splash: 155 if splash:
156 cfgfile.write('menu background splash.lss\n') 156 cfgfile.write('menu background splash.lss\n')
157 157
158 for label in labels.split(): 158 for label in labels.split():
159 localdata = bb.data.createCopy(d) 159 localdata = bb.data.createCopy(d)
160 160
161 overrides = localdata.getVar('OVERRIDES', True) 161 overrides = localdata.getVar('OVERRIDES')
162 if not overrides: 162 if not overrides:
163 bb.fatal('OVERRIDES not defined') 163 bb.fatal('OVERRIDES not defined')
164 164
@@ -170,19 +170,19 @@ python build_syslinux_cfg () {
170 btypes = [ [ "Graphics console ", syslinux_default_console ], 170 btypes = [ [ "Graphics console ", syslinux_default_console ],
171 [ "Serial console ", syslinux_serial_tty ] ] 171 [ "Serial console ", syslinux_serial_tty ] ]
172 172
173 root= d.getVar('SYSLINUX_ROOT', True) 173 root= d.getVar('SYSLINUX_ROOT')
174 if not root: 174 if not root:
175 bb.fatal('SYSLINUX_ROOT not defined') 175 bb.fatal('SYSLINUX_ROOT not defined')
176 176
177 for btype in btypes: 177 for btype in btypes:
178 cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label)) 178 cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
179 179
180 exargs = d.getVar('SYSLINUX_KERNEL_ARGS', True) 180 exargs = d.getVar('SYSLINUX_KERNEL_ARGS')
181 if exargs: 181 if exargs:
182 btype[1] += " " + exargs 182 btype[1] += " " + exargs
183 183
184 append = localdata.getVar('APPEND', True) 184 append = localdata.getVar('APPEND')
185 initrd = localdata.getVar('INITRD', True) 185 initrd = localdata.getVar('INITRD')
186 186
187 append = root + " " + append 187 append = root + " " + append
188 cfgfile.write('APPEND ') 188 cfgfile.write('APPEND ')