mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d5e67725ac
commit
c4e2c59088
@@ -72,14 +72,14 @@ efi_hddimg_populate() {
|
||||
python build_efi_cfg() {
|
||||
import sys
|
||||
|
||||
workdir = d.getVar('WORKDIR', True)
|
||||
workdir = d.getVar('WORKDIR')
|
||||
if not workdir:
|
||||
bb.error("WORKDIR not defined, unable to package")
|
||||
return
|
||||
|
||||
gfxserial = d.getVar('GRUB_GFXSERIAL', True) or ""
|
||||
gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
|
||||
|
||||
labels = d.getVar('LABELS', True)
|
||||
labels = d.getVar('LABELS')
|
||||
if not labels:
|
||||
bb.debug(1, "LABELS not defined, nothing to do")
|
||||
return
|
||||
@@ -88,7 +88,7 @@ python build_efi_cfg() {
|
||||
bb.debug(1, "No labels, nothing to do")
|
||||
return
|
||||
|
||||
cfile = d.getVar('GRUB_CFG', True)
|
||||
cfile = d.getVar('GRUB_CFG')
|
||||
if not cfile:
|
||||
bb.fatal('Unable to read GRUB_CFG')
|
||||
|
||||
@@ -99,33 +99,33 @@ python build_efi_cfg() {
|
||||
|
||||
cfgfile.write('# Automatically created by OE\n')
|
||||
|
||||
opts = d.getVar('GRUB_OPTS', True)
|
||||
opts = d.getVar('GRUB_OPTS')
|
||||
if opts:
|
||||
for opt in opts.split(';'):
|
||||
cfgfile.write('%s\n' % opt)
|
||||
|
||||
cfgfile.write('default=%s\n' % (labels.split()[0]))
|
||||
|
||||
timeout = d.getVar('GRUB_TIMEOUT', True)
|
||||
timeout = d.getVar('GRUB_TIMEOUT')
|
||||
if timeout:
|
||||
cfgfile.write('timeout=%s\n' % timeout)
|
||||
else:
|
||||
cfgfile.write('timeout=50\n')
|
||||
|
||||
root = d.getVar('GRUB_ROOT', True)
|
||||
root = d.getVar('GRUB_ROOT')
|
||||
if not root:
|
||||
bb.fatal('GRUB_ROOT not defined')
|
||||
|
||||
if gfxserial == "1":
|
||||
btypes = [ [ " graphics console", "" ],
|
||||
[ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ]
|
||||
[ " serial console", d.getVar('GRUB_SERIAL') or "" ] ]
|
||||
else:
|
||||
btypes = [ [ "", "" ] ]
|
||||
|
||||
for label in labels.split():
|
||||
localdata = d.createCopy()
|
||||
|
||||
overrides = localdata.getVar('OVERRIDES', True)
|
||||
overrides = localdata.getVar('OVERRIDES')
|
||||
if not overrides:
|
||||
bb.fatal('OVERRIDES not defined')
|
||||
|
||||
@@ -141,8 +141,8 @@ python build_efi_cfg() {
|
||||
|
||||
cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
|
||||
|
||||
append = localdata.getVar('APPEND', True)
|
||||
initrd = localdata.getVar('INITRD', True)
|
||||
append = localdata.getVar('APPEND')
|
||||
initrd = localdata.getVar('INITRD')
|
||||
|
||||
if append:
|
||||
append = replace_rootfs_uuid(d, append)
|
||||
|
||||
Reference in New Issue
Block a user