Using devtool modify virtual/kernel fails when EXTRAVERSION field is empty. linux/Makefile ----- snip ---- VERSION = 4 PATCHLEVEL = 9 SUBLEVEL = 99 EXTRAVERSION = NAME = Roaring Lionus ----- snip ----- With this version string the standard.py get_staging_kver function fails with Traceback (most recent call last): File "/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/devtool", line 334, in <module> ret = main() File "/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/devtool", line 321, in main ret = args.func(args, config, basepath, workspace) File "/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/lib/devtool/standard.py", line 801, in modify staging_kerVer = get_staging_kver(srcdir) File "/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/lib/devtool/standard.py", line 736, in get_staging_kver kerver.append(word.split('= ')[1].split('\n')[0]) IndexError: list index out of range
The code throwing the error exists in master. At first glance, any stable mainline kernel will have an empty EXTRAVERSION field, so this needs to be addressed. The user is likely on a prior release (rocko? 4.9 kernel and MACHINE imx7ulp). The fix will need to be backported, but rocko is out of support for quite a while now. meta-freescale has newer releases (up through dunfell) with newer kernels.
I am unable to replicate the error on linux-yocto for Dunfell and latest tree. Mathew can you please provide more details about exactly which layers you are using (your conf/bblayers.conf) and the release/version/commithash for those layers. Also please include the MACHINE and other relevant settings from your conf/local.conf
Haven't heard anything from the original reporter since June. I cannot reproduce this error, so closing as "works for me". Also removing the Backport whiteboard, since we do not have any action at this time. If you are still experiencing this issue, please reopen the bug and provide the requested additional information.
This is not using a yocto kernel. Any kernel which has an empty EXTRAVERSION field will hit this issue which is any stable kernel version.
I am using dunfell and zeus to reproduce this issue. The python code in the error explains it best. kerver.append(word.split('= ')[1].split('\n')[0]) Taking an index of 1 after a split when there is no version will cause "IndexError: list index out of range"
I can apply a patch to either standard.py or to the linux kernel but this seems like something that should be handled given its common to find this field empty in stable kernel releases.
Comments added above
Please give us a reproducer. Enough detail that we can produce your exact failure. I tested this on multiple kernels without an EXTRAVERSION and saw no trouble. What yocto release are you using? What layers do you have? Which MACHINE are you using? What is the basis of your kernel recipe? linux-custom? What is your SRC_URI for the kernel recipe?
I was not able to reproduce this right away either. It only gets triggered when the workshareddir is not empty. bitbake virtual/kernel -c do_shared_workdir devtool modify virtual/kernel
Assigning to Saul as he might have time to work on it.
Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)
Set to future. Please move back to a milestone should you have time to work on this.