<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13938</bug_id>
          
          <creation_ts>2020-06-11 07:04:13 +0000</creation_ts>
          <short_desc>devtool modify virtual/kernel fails when EXTRAVERSION field is empty in Makefile</short_desc>
          <delta_ts>2025-05-29 16:09:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathew Prokos">mathew.prokos</reporter>
          <assigned_to name="Eilís Ní Fhlannagáin">pidge</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87460</commentid>
    <comment_count>0</comment_count>
    <who name="Mathew Prokos">mathew.prokos</who>
    <bug_when>2020-06-11 07:04:13 +0000</bug_when>
    <thetext>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 &quot;/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/devtool&quot;, line 334, in &lt;module&gt;
    ret = main()
  File &quot;/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/devtool&quot;, line 321, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/lib/devtool/standard.py&quot;, line 801, in modify
    staging_kerVer = get_staging_kver(srcdir)
  File &quot;/srctrees/imx7ulp/mainline_integ/platforms/yocto/poky/scripts/lib/devtool/standard.py&quot;, line 736, in get_staging_kver
    kerver.append(word.split(&apos;= &apos;)[1].split(&apos;\n&apos;)[0])
IndexError: list index out of range</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87469</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-06-11 09:52:55 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87852</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-07-30 07:24:49 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87887</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-08-06 08:05:57 +0000</bug_when>
    <thetext>Haven&apos;t heard anything from the original reporter since June. I cannot reproduce this error, so closing as &quot;works for me&quot;.

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87894</commentid>
    <comment_count>4</comment_count>
    <who name="Mathew Prokos">mathew.prokos</who>
    <bug_when>2020-08-06 16:06:05 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87895</commentid>
    <comment_count>5</comment_count>
    <who name="Mathew Prokos">mathew.prokos</who>
    <bug_when>2020-08-06 16:11:17 +0000</bug_when>
    <thetext>I am using dunfell and zeus to reproduce this issue. The python code in the error explains it best.

kerver.append(word.split(&apos;= &apos;)[1].split(&apos;\n&apos;)[0])

Taking an index of 1 after a split when there is no version will cause 
&quot;IndexError: list index out of range&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87896</commentid>
    <comment_count>6</comment_count>
    <who name="Mathew Prokos">mathew.prokos</who>
    <bug_when>2020-08-06 16:13:13 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87897</commentid>
    <comment_count>7</comment_count>
    <who name="Mathew Prokos">mathew.prokos</who>
    <bug_when>2020-08-06 16:15:11 +0000</bug_when>
    <thetext>Comments added above</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87933</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-08-13 08:27:59 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87955</commentid>
    <comment_count>9</comment_count>
    <who name="Mathew Prokos">mathew.prokos</who>
    <bug_when>2020-08-15 09:09:31 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92948</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-04-07 16:28:16 +0000</bug_when>
    <thetext>Assigning to Saul as he might have time to work on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100084</commentid>
    <comment_count>11</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-10-31 15:09:22 +0000</bug_when>
    <thetext>Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102100</commentid>
    <comment_count>12</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-05-29 16:09:53 +0000</bug_when>
    <thetext>Set to future. Please move back to a milestone should you have time to work on this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>