<?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>10597</bug_id>
          
          <creation_ts>2016-11-03 18:33:37 +0000</creation_ts>
          <short_desc>license_create_manifest fails when linux-dummy is used to create own kernel</short_desc>
          <delta_ts>2023-02-07 11:09:40 +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>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jose Perez C">jose.perez.carranza</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>mikko.ylinen</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tom.zanussi</cc>
    
    <cc>wenzong.fan</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>67931</commentid>
    <comment_count>0</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2016-11-03 18:33:37 +0000</bug_when>
    <thetext>Currently the kernel.py test is failing when running selftest on autobuilder due license_create_manifest function is locking for &quot;kernel-4.8.3-yocto-standard&quot; when PREFERRED_PROVIDER_virtual/kernel = &quot;linux-dummy&quot; is set. 


Autobuilder log :

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/719/steps/Running%20oe-selftest/logs/stdio 

---- Steps -----

1. Run nightly-oe-selftest on AB</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67969</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-11-04 13:00:23 +0000</bug_when>
    <thetext>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:license_create_manifest(d)
     0003:
File: &apos;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass&apos;, lineno: 48, function: license_create_manifest
     0044:    pkg_dic = {}
     0045:    for pkg in sorted(image_list_installed_packages(d)):
     0046:        pkg_info = os.path.join(d.getVar(&apos;PKGDATA_DIR&apos;, True),
     0047:                                &apos;runtime-reverse&apos;, pkg)
 *** 0048:        pkg_name = os.path.basename(os.readlink(pkg_info))
     0049:
     0050:        pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info)
     0051:        if not &quot;LICENSE&quot; in pkg_dic[pkg_name].keys():
     0052:            pkg_lic_name = &quot;LICENSE_&quot; + pkg_name
Exception: FileNotFoundError: [Errno 2] No such file or directory: &apos;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/sysroots/qemux86-64/pkgdata/runtime-reverse/kernel-4.8.3-yocto-standard&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71018</commentid>
    <comment_count>2</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-03-01 13:10:54 +0000</bug_when>
    <thetext>I accidentally ran into this too and looked into it a bit.

There are two kernels in the package feed which Provides: the same
functionality. The one that&apos;s built afterwards is tracked in pkgdata
as runtime-reverse but the package manager has installed the other
(returned by image_list_installed_packages).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71119</commentid>
    <comment_count>3</comment_count>
    <who name="Wenzong.Fan">wenzong.fan</who>
    <bug_when>2017-03-08 02:30:22 +0000</bug_when>
    <thetext>One more case about the failure.

I got the similar errors while I building meta-selinux and changed the refpolicy provider by setting &apos;PREFERRED_PROVIDER_virtual/refpolicy = &quot;refpolicy-minimum&quot;&apos; in local.conf.

Steps to reproduce it:
1) Setup a build with meta-selinux layer included, and update local.conf:

+ DISTRO ?= &quot;poky-selinux&quot;
+ PREFERRED_VERSION_refpolicy-mls ?= &quot;2.20161023&quot;
+ PREFERRED_VERSION_refpolicy-standard ?= &quot;2.20161023&quot;
+ PREFERRED_VERSION_refpolicy-mcs ?= &quot;2.20161023&quot;
+ PREFERRED_VERSION_refpolicy-minimum ?= &quot;2.20161023&quot;
+ PREFERRED_VERSION_refpolicy-targeted ?= &quot;2.20161023&quot;

2) Run build with &quot;bitbake core-image-selinux&quot;
3) Change refpolicy provider with:

+ PREFERRED_PROVIDER_virtual/refpolicy = &quot;refpolicy-minimum&quot;

4) Run &quot;bitbake core-image-selinux&quot; again, then below error occurs:

ERROR: core-image-selinux-1.0-r0 do_rootfs: 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:license_create_manifest(d)
     0003:
File: &apos;/.../poky/meta/classes/license.bbclass&apos;, lineno: 48, function: license_create_manifest
     0044:    pkg_dic = {}
     0045:    for pkg in sorted(image_list_installed_packages(d)):
     0046:        pkg_info = os.path.join(d.getVar(&apos;PKGDATA_DIR&apos;),
     0047:                                &apos;runtime-reverse&apos;, pkg)
 *** 0048:        pkg_name = os.path.basename(os.readlink(pkg_info))
     0049:
     0050:        pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info)
     0051:        if not &quot;LICENSE&quot; in pkg_dic[pkg_name].keys():
     0052:            pkg_lic_name = &quot;LICENSE_&quot; + pkg_name
Exception: FileNotFoundError: [Errno 2] No such file or directory: &apos;/.../tmp/pkgdata/qemux86-64/runtime-reverse/refpolicy-mls&apos;

ERROR: core-image-selinux-1.0-r0 do_rootfs: Function failed: license_create_manifest

I have changed the package provider as B, but it still search files from A.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94897</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-02-07 11:09:40 +0000</bug_when>
    <thetext>In the years since 2017, the code has changed a lot and we now clean up sysroots much more carefully in circumstances where providers change. I don&apos;t believe this error can occur any more.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>