make sure we quote extra_kernel_options

argparse will remove quotations, breaking extra_kernel_options and
inspector_extra_kernel_options when more than one option is used, e.g.

  --extra-vars extra_kernel_options="console=tty1 console=ttyS0,115200n8"

Change-Id: I324e1681303115162656f39d7b6cd60a3e717b9f
This commit is contained in:
Erik Berg 2022-08-11 12:24:10 +02:00
parent d6e6d647c7
commit 673318cf57

View File

@ -50,9 +50,16 @@ def log(*message, only_if=True):
def process_extra_vars(extra_vars):
for item in extra_vars:
# argparse removes quotes, just add quotes for these vars
if 'extra_kernel_options=' in item:
key, value = item.split('=', 1)
item = key + '="' + value + '"'
if item.startswith('@'):
# Make sure relative paths still work
item = '@' + os.path.abspath(item[1:])
yield ('-e', item)