mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-22 17:02:01 -09:00
utils/genrandconfig: add missing newline
The line:
configlines.remove('BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y')
would fail with:
Traceback (most recent call last):
File "/home/thomas/projets/buildroot/./utils/genrandconfig", line 650, in <module>
ret = asyncio.run(gen_config(args))
File "/usr/lib64/python3.14/asyncio/runners.py", line 205, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib64/python3.14/asyncio/runners.py", line 128, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib64/python3.14/asyncio/base_events.py", line 720, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/home/thomas/projets/buildroot/./utils/genrandconfig", line 556, in gen_config
if await fixup_config(sysinfo, configfile):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thomas/projets/buildroot/./utils/genrandconfig", line 255, in fixup_config
configlines.remove('BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y')
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: list.remove(x): x not in list
because all configlines end with a newline, so this needs to be fixed
to:
configlines.remove('BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y\n')
Fixes: b07d21ab98 ("utils/genrandconfig: handle BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
f09b4c5bf7
commit
731121fc1b
@@ -252,7 +252,7 @@ async def fixup_config(sysinfo, configfile):
|
||||
|
||||
if 'BR2_LINUX_KERNEL=y\n' in configlines and \
|
||||
'BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y\n' in configlines:
|
||||
configlines.remove('BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y')
|
||||
configlines.remove('BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y\n')
|
||||
|
||||
if 'BR2_PACKAGE_LINUX_BACKPORTS=y\n' in configlines and \
|
||||
'BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG=y\n' in configlines and \
|
||||
|
||||
Reference in New Issue
Block a user