<?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>8633</bug_id>
          
          <creation_ts>2015-11-03 14:43:12 +0000</creation_ts>
          <short_desc>Add LICENSE_CREATE_PACKAGE to the Variables Glossary</short_desc>
          <delta_ts>2016-02-03 16:44:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</component>
          <version>2.0</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>3 Feb 2016: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1</target_milestone>
          
          <blocked>8634</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Bevenson">bevenson</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>56142</commentid>
    <comment_count>0</comment_count>
    <who name="Bevenson">bevenson</who>
    <bug_when>2015-11-03 14:43:12 +0000</bug_when>
    <thetext>The variable LICENSE_CREATE_PACKAGE exists, but there is no description of this variable in the documentation.

Add LICENSE_CREATE_PACKAGE to the Variables Glossary.  Describe what this variable does and how to use it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57658</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-01-07 23:12:43 +0000</bug_when>
    <thetext>Hi, 

Can someone give me an explanation of this variable from the user&apos;s point of view?  I grepped in poky for the variable and it occurs three times in the license.bbclass file.  It is a BOOLEAN variable that is set to &quot;0&quot;.  It is used here:

# it would be better to copy them in do_install_append, but find_license_filesa is python
python perform_packagecopy_prepend () {
    enabled = oe.data.typed_value(&apos;LICENSE_CREATE_PACKAGE&apos;, d)
    if d.getVar(&apos;CLASSOVERRIDE&apos;, True) == &apos;class-target&apos; and enabled:
        lic_files_paths = find_license_files(d)

        # LICENSE_FILES_DIRECTORY starts with &apos;/&apos; so os.path.join cannot be used to join D and LICENSE_FILES_DIRECTORY
        destdir = d.getVar(&apos;D&apos;, True) + os.path.join(d.getVar(&apos;LICENSE_FILES_DIRECTORY&apos;, True), d.getVar(&apos;PN&apos;, True))
        copy_license_files(lic_files_paths, destdir)
        add_package_and_files(d)
}
 
How does this translate to what a user would do with this variable?

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57725</commentid>
    <comment_count>2</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2016-01-11 22:57:39 +0000</bug_when>
    <thetext>Paul,

Can you comment on this?

Thanks,

Stephen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58376</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-02-01 10:37:18 +0000</bug_when>
    <thetext>When LICENSE_CREATE_PACKAGE is set, i.e. LICENSE_CREATE_PACKAGE=&quot;1&quot;, the system will create an extra package for each recipe, ${PN}-lic, and add that package to the RRECOMMENDS_${PN}.

The ${PN}-lic package installs a directory in /usr/share-licenses named ${PN} (the recipe&apos;s base name) and installs files in that directory containing license and copyright information — copies of the appropriate license files from meta/common-licenses (matching the licenses specified in the LICENSE field of the recipe metadata) and files marked in LIC_FILES_CHKSUM as containing license text.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58475</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-02-03 01:33:15 +0000</bug_when>
    <thetext>Hi, 

Can you look at http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-LICENSE_CREATE_PACKAGE and tell me if this variable description works?  

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58493</commentid>
    <comment_count>5</comment_count>
    <who name="Bevenson">bevenson</who>
    <bug_when>2016-02-03 12:20:48 +0000</bug_when>
    <thetext>I gave it a try per the instructions and I&apos;m seeing some discrepancies.  I added the line LICENSE_CREATE_PACKAGE = &quot;1&quot; to my local.conf and rebuilt my image (bitbake &lt;image-name&gt;, I did not issue a -c clean or -c cleansstate on anything first).  There was one package that needed to be rebuilt anyway, and this was the only package for which a -lic package was created.  If someone is adding this variable for an existing recipe, somewhere should be a description of how to force a build of all the -lic packages for the image.

On my image, the -lic package installed the license files to /usr/share/licenses/${PN}, not /usr/share-licenses/${PN} as in the description.

I&apos;m on poky/dizzy-1.7.3.  I didn&apos;t see any changes in license.bbclass between dizzy and master that would affect LICENSE_CREATE_PACKAGE&apos;s behaivor, but it would be worth a test with master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58500</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-02-03 14:48:35 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; On my image, the -lic package installed the license files to
&gt; /usr/share/licenses/${PN}, not /usr/share-licenses/${PN} as in the
&gt; description.

Yes, that matches here. Apologies Scott, I typoed in my original description above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58503</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-02-03 15:24:21 +0000</bug_when>
    <thetext>No problem... I fixed the path. See http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-LICENSE_CREATE_PACKAGE.

Regarding how to force the thing to create a license file for all the packages in an image... If you tell me how to do that I can add it to the description.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58506</commentid>
    <comment_count>8</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-02-03 15:51:09 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; I gave it a try per the instructions and I&apos;m seeing some discrepancies.  I
&gt; added the line LICENSE_CREATE_PACKAGE = &quot;1&quot; to my local.conf and rebuilt my
&gt; image (bitbake &lt;image-name&gt;, I did not issue a -c clean or -c cleansstate on
&gt; anything first).  There was one package that needed to be rebuilt anyway,
&gt; and this was the only package for which a -lic package was created.  If
&gt; someone is adding this variable for an existing recipe, somewhere should be
&gt; a description of how to force a build of all the -lic packages for the image.

This is expected to work, I&apos;ve re-opened an existing bug to track it: #5635</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58507</commentid>
    <comment_count>9</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-02-03 16:04:19 +0000</bug_when>
    <thetext>Josh, 

So can I set the doc flag to &quot;done&quot; for this 8633 bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58510</commentid>
    <comment_count>10</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-02-03 16:40:27 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; So can I set the doc flag to &quot;done&quot; for this 8633 bug?

I believe you can mark it resolved. This bug is tracking the docs requirement, #5635 is tracking the bug. The documentation is updated as requested.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5635</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58511</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-02-03 16:44:48 +0000</bug_when>
    <thetext>Per Josh... I am marking this RESOLVED and resetting the doc flag to &quot;done&quot;.  I know I don&apos;t own the bug but it saves Paul from having to do it.

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>