<?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>14123</bug_id>
          
          <creation_ts>2020-11-10 15:21:42 +0000</creation_ts>
          <short_desc>License manifest loss when switching MACHINE</short_desc>
          <delta_ts>2024-01-26 16:24:14 +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>core</component>
          <version>3.1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT AB-HAVE-PLAN</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve Sakoman">steve</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>JPEWhacker</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>simone.p.weiss</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>88590</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2020-11-10 15:21:42 +0000</bug_when>
    <thetext>ERROR: core-image-minimal-1.0-r0 do_populate_lic_deploy: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:do_populate_lic_deploy(d)
     0003:
File: &apos;/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/classes/license_image.bbclass&apos;, lineno: 251, function: do_populate_lic_deploy
     0247:ROOTFS_POSTPROCESS_COMMAND_prepend = &quot;write_package_manifest; license_create_manifest; &quot;
     0248:do_rootfs[recrdeptask] += &quot;do_populate_lic&quot;
     0249:
     0250:python do_populate_lic_deploy() {
 *** 0251:    license_deployed_manifest(d)
     0252:}
     0253:
     0254:addtask populate_lic_deploy before do_build after do_image_complete
     0255:do_populate_lic_deploy[recrdeptask] += &quot;do_populate_lic do_deploy&quot;
File: &apos;/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/classes/license_image.bbclass&apos;, lineno: 192, function: license_deployed_manifest
     0188:        man_dic[dep][&quot;IMAGE_MANIFEST&quot;] = True
     0189:        man_dic[dep][&quot;PN&quot;] = dep
     0190:        man_dic[dep][&quot;FILES&quot;] = \
     0191:            &quot; &quot;.join(get_deployed_files(dep_dic[dep]))
 *** 0192:        with open(os.path.join(lic_dir, dep, &quot;recipeinfo&quot;), &quot;r&quot;) as f:
     0193:            for line in f.readlines():
     0194:                key,val = line.split(&quot;: &quot;, 1)
     0195:                man_dic[dep][key] = val[:-1]
     0196:
Exception: FileNotFoundError: [Errno 2] No such file or directory: &apos;/home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-21565/tmp/deploy/licenses/linux-yocto/recipeinfo&apos;


Complete log at:

https://errors.yoctoproject.org/Errors/Details/538106/

Build directory saved in /home/pokybuild/saved/build-st-21565 on debian9-ty-2

A quick look shows that there is no tmp/deploy/licenses/linux-yocto directory</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90862</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-07-06 11:46:29 +0000</bug_when>
    <thetext>There were builds for both qemux86-64 and genericx86-64 which would have overlapping files for tmp/deploy/licenses/linux-yocto/

The workdir for genericx86-64 linux-yocto does show the files as being present and should have been installed. The qemux86-64 kernel is only built up to do_patch. There are logs showing linux-yocto was cleaned for qemux86-64.

The mixing of machine specific files like this looks like a recipe for disaster and I think it is just luck we&apos;re not hitting many more issues with this code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90863</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-07-06 14:00:08 +0000</bug_when>
    <thetext>Reproduction steps:

MACHINE=qemux86-64 bitbake core-image-minimal
MACHINE=genericx86-64 bitbake core-image-minimal
MACHINE=qemux86-64 bitbake linux-yocto -c clean
MACHINE=genericx86-64 bitbake core-image-minimal -C rootfs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96515</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-09-18 13:33:16 +0000</bug_when>
    <thetext>With create-spdx as default, this now fails with:

ERROR: core-image-minimal-1.0-r0 do_rootfs: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_func_python() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:image_combine_spdx(d)
     0003:
File: &apos;/media/build/poky/meta/classes/create-spdx-2.2.bbclass&apos;, lineno: 953, function: image_combine_spdx
     0949:    imgdeploydir = Path(d.getVar(&quot;IMGDEPLOYDIR&quot;))
     0950:    img_spdxid = oe.sbom.get_image_spdxid(image_name)
     0951:    packages = image_list_installed_packages(d)
     0952:
 *** 0953:    combine_spdx(d, image_name, imgdeploydir, img_spdxid, packages, Path(d.getVar(&quot;SPDXIMAGEWORK&quot;)))
     0954:
     0955:    def make_image_link(target_path, suffix):
     0956:        if image_link_name:
     0957:            link = imgdeploydir / (image_link_name + suffix)
File: &apos;/media/build/poky/meta/classes/create-spdx-2.2.bbclass&apos;, lineno: 1117, function: combine_spdx
     1113:                for ref in doc.externalDocumentRefs:
     1114:                    ref_path = oe.sbom.doc_path_by_namespace(deploy_dir_spdx, ref.spdxDocument)
     1115:                    collect_spdx_document(ref_path)
     1116:
 *** 1117:            collect_spdx_document(image_spdx_path)
     1118:
     1119:            index[&quot;documents&quot;].sort(key=lambda x: x[&quot;filename&quot;])
     1120:
     1121:            index_str = io.BytesIO(json.dumps(
File: &apos;/media/build/poky/meta/classes/create-spdx-2.2.bbclass&apos;, lineno: 1115, function: collect_spdx_document
     1111:                    })
     1112:
     1113:                for ref in doc.externalDocumentRefs:
     1114:                    ref_path = oe.sbom.doc_path_by_namespace(deploy_dir_spdx, ref.spdxDocument)
 *** 1115:                    collect_spdx_document(ref_path)
     1116:
     1117:            collect_spdx_document(image_spdx_path)
     1118:
     1119:            index[&quot;documents&quot;].sort(key=lambda x: x[&quot;filename&quot;])
File: &apos;/media/build/poky/meta/classes/create-spdx-2.2.bbclass&apos;, lineno: 1085, function: collect_spdx_document
     1081:                    return
     1082:
     1083:                visited_docs.add(path)
     1084:
 *** 1085:                with path.open(&quot;rb&quot;) as f:
     1086:                    doc, sha1 = oe.sbom.read_doc(f)
     1087:                    f.seek(0)
     1088:
     1089:                    if doc.documentNamespace in visited_docs:
File: &apos;/usr/lib/python3.10/pathlib.py&apos;, lineno: 1119, function: open
     1115:        the built-in open() function does.
     1116:        &quot;&quot;&quot;
     1117:        if &quot;b&quot; not in mode:
     1118:            encoding = io.text_encoding(encoding)
 *** 1119:        return self._accessor.open(self, mode, buffering, encoding, errors,
     1120:                                   newline)
     1121:
     1122:    def read_bytes(self):
     1123:        &quot;&quot;&quot;
Exception: FileNotFoundError: [Errno 2] No such file or directory: &apos;/media/build/poky/build/tmp/deploy/spdx/by-namespace/http:__spdx.org_spdxdoc_kernel-a04b82a2-40ce-50cc-92b7-d98ced8e6259&apos;

ERROR: Logfile of failure stored in: /media/build/poky/build/tmp/work/genericx86_64-poky-linux/core-image-minimal/1.0/temp/log.do_rootfs.2396412
ERROR: Task (/media/build/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code &apos;1&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97149</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:37:31 +0000</bug_when>
    <thetext>Build move to 5.0 -- ../Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97963</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-01-23 18:17:01 +0000</bug_when>
    <thetext>Is this still an issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97978</commentid>
    <comment_count>6</comment_count>
    <who name="Simone Weiß">simone.p.weiss</who>
    <bug_when>2024-01-25 06:23:38 +0000</bug_when>
    <thetext>Tried to reproduce with the steps mentioned in https://bugzilla.yoctoproject.org/show_bug.cgi?id=14123#c2. No issue was visible any more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98040</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-01-25 15:55:49 +0000</bug_when>
    <thetext>Richard wants to double check and maybe find the commit that fixed this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98042</commentid>
    <comment_count>8</comment_count>
    <who name="Simone Weiß">simone.p.weiss</who>
    <bug_when>2024-01-25 16:11:54 +0000</bug_when>
    <thetext>I checked, this was fixed via b0b0b89ad763a50cb02429b31f24400ddd4491b7 by Richard already. Seems just like the Bug was not updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98050</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-01-26 16:24:14 +0000</bug_when>
    <thetext>I double checked that the license issue was fixed as well as the spdx one and it was so we can close this as fixed by b0b0b89ad763a50cb02429b31f24400ddd4491b7, thanks for the commit Simone.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>