<?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>10325</bug_id>
          
          <creation_ts>2016-09-23 03:32:16 +0000</creation_ts>
          <short_desc>license.bbclass should only copy licenses for packages actually installed</short_desc>
          <delta_ts>2017-03-02 17:27:30 +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.2</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saul Wold">sgw</reporter>
          <assigned_to name="Aníbal Limón">anibal.limon</assigned_to>
          <cc>anibal.limon</cc>
    
    <cc>bluelightning</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>net147</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66536</commentid>
    <comment_count>0</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2016-09-23 03:32:16 +0000</bug_when>
    <thetext>The license.bbclass has 2 options, COPY_LIC_MANIFEST and COPY_LIC_DIRS.  The MANIFEST option will correctly collect the licenses from the packages installed on the target rootfs.

The LIC_DIRS copies all of the recipe&apos;s licenses regardless of whether that installed packages use those licenses or not.  This is most noticed with the linux-firmware recipe and related packages where there are many licenses for the firmware, but only the installed packages with specific licenses should be included.

One solution would be to modify the COPY_LIC_DIRS to always create the manifest, which is based on the installed packages and only copy those licenses to the common-licenses directory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69462</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-01-03 23:35:29 +0000</bug_when>
    <thetext>I started to do some investigation on this and I think it can be accomplished by tracking in an array which licenses are listed in the manifest.

There seems to be an additional behavior that I am not sure is correct or not, this is also copying additional files like recipeinfo from the license deploy dir to the rootfs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70671</commentid>
    <comment_count>2</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-02-13 20:36:23 +0000</bug_when>
    <thetext>The current implementation takes into account packages at time of copy licenses to the rootfs.

The problem seems to be at do_populate_lic [1], that is copying all the licenses associated with a recipe in every package.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/license.bbclass#n291</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70692</commentid>
    <comment_count>3</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-02-14 16:30:04 +0000</bug_when>
    <thetext>Review sent at,

http://lists.openembedded.org/pipermail/openembedded-core/2017-February/132740.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71052</commentid>
    <comment_count>4</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-03-02 17:27:30 +0000</bug_when>
    <thetext>Merge at,

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=129fbf324a34f2535206458a48ab067d7de9e354</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>