<?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>1844</bug_id>
          
          <creation_ts>2011-12-19 04:45:11 +0000</creation_ts>
          <short_desc>base.bbclass should check for multiple (or) licenses in bb files</short_desc>
          <delta_ts>2012-01-11 02:09:45 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</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>normal</bug_severity>
          <target_milestone>1.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrei Gherzan">andrei</reporter>
          <assigned_to name="Andrei Gherzan">andrei</assigned_to>
          <cc>kergoth</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>17720</commentid>
    <comment_count>0</comment_count>
      <attachid>302</attachid>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2011-12-19 04:45:11 +0000</bug_when>
    <thetext>Created attachment 302
base.bbclass checks for multiple (or) licenses

There are a couple of packages with double or multiple license. This means that everybody can choose from a set of licenses.

[example : qt4-embedded]
LICENSE = &quot;LGPLv2.1 | GPLv3&quot;

Well, this &quot;or&quot; operand doesn&apos;t work as i end up with this error in a 
GPLv3 incompatible build:

[example : qt4-embedded]
ERROR: Nothing PROVIDES &apos;qt4-embedded&apos;
ERROR: qt4-embedded was skipped: incompatible with license LGPLv2.1 | GPLv3
ERROR: Command execution failed: Traceback (most recent call last):
   File 
&quot;/home/agherzan/work/wrs/yocto-adige/poky/bitbake/lib/bb/command.py&quot;, 
line 87, in runAsyncCommand
     commandmethod(self.cmds_async, self, options)
   File 
&quot;/home/agherzan/work/wrs/yocto-adige/poky/bitbake/lib/bb/command.py&quot;, 
line 192, in buildTargets
     command.cooker.buildTargets(pkgs_to_build, task)
   File 
&quot;/home/agherzan/work/wrs/yocto-adige/poky/bitbake/lib/bb/cooker.py&quot;, 
line 1111, in buildTargets
     taskdata.add_provider(localdata, self.status, k)
   File 
&quot;/home/agherzan/work/wrs/yocto-adige/poky/bitbake/lib/bb/taskdata.py&quot;, 
line 371, in add_provider
     self.add_provider_internal(cfgData, dataCache, item)
   File 
&quot;/home/agherzan/work/wrs/yocto-adige/poky/bitbake/lib/bb/taskdata.py&quot;, 
line 391, in add_provider_internal
     raise bb.providers.NoProvider(item)
NoProvider: qt4-embedded


For the case of excluding a certain license, base.bbclass should be modified in order to check if there is an &quot;or&quot; operand, and if it is, should check further if there are other non-excluded licenses.

I will attach a patch that would solve this problem. Please check it and tell me if i should commit it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17722</commentid>
    <comment_count>1</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2011-12-19 06:38:57 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Created attachment 302 [details]
&gt; base.bbclass checks for multiple (or) licenses

I&apos;m sure this method might be a quick one, and if so, that could be a reason to stick with it, but it does seem to be duplicating at least some of the logic which already exists in the license parsing code used by license.bbclass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17724</commentid>
    <comment_count>2</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2011-12-19 07:23:15 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; &gt; Created attachment 302 [details] [details]
&gt; &gt; base.bbclass checks for multiple (or) licenses
&gt; 
&gt; I&apos;m sure this method might be a quick one, and if so, that could be a reason to
&gt; stick with it, but it does seem to be duplicating at least some of the logic
&gt; which already exists in the license parsing code used by license.bbclass.

As i know that class is taken into consideration while building packages. Didn&apos;t see any license checked there for dependencies or excluded licenses. So i think my solution is ok.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17725</commentid>
    <comment_count>3</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2011-12-19 07:43:52 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; (In reply to comment #0)
&gt; &gt; &gt; Created attachment 302 [details] [details] [details]
&gt; &gt; &gt; base.bbclass checks for multiple (or) licenses
&gt; &gt; 
&gt; &gt; I&apos;m sure this method might be a quick one, and if so, that could be a reason to
&gt; &gt; stick with it, but it does seem to be duplicating at least some of the logic
&gt; &gt; which already exists in the license parsing code used by license.bbclass.
&gt; 
&gt; As i know that class is taken into consideration while building packages.
&gt; Didn&apos;t see any license checked there for dependencies or excluded licenses. So
&gt; i think my solution is ok.

I don&apos;t understand the point you&apos;re trying to make here. Whether license.bbclass excludes or not, the core logic is the same, and duplicating it arguably increases maintenance load. copyleft_compliance.bbclass uses the same parsing, and it *does* support exclusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17727</commentid>
    <comment_count>4</comment_count>
    <who name="Christopher Larson">kergoth</who>
    <bug_when>2011-12-19 07:44:31 +0000</bug_when>
    <thetext>Note: I don&apos;t have a strong opinion either way on this, I just wanted to make sure the decision was a conscious one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17896</commentid>
    <comment_count>5</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2011-12-30 03:32:15 +0000</bug_when>
    <thetext>Patch submitted by email to openembedded-core list:

http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/015128.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18025</commentid>
    <comment_count>6</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2012-01-09 07:46:24 +0000</bug_when>
    <thetext>http://lists.linuxtogo.org/pipermail/openembedded-core/2012-January/015873.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18042</commentid>
    <comment_count>7</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2012-01-10 07:21:38 +0000</bug_when>
    <thetext>http://lists.linuxtogo.org/pipermail/openembedded-core/2012-January/015953.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18069</commentid>
    <comment_count>8</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2012-01-11 02:09:45 +0000</bug_when>
    <thetext>commit 4005c3ff5e673f9d561026c76326054bd0a3a2b6</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>302</attachid>
            <date>2011-12-19 04:45:11 +0000</date>
            <delta_ts>2011-12-19 04:45:11 +0000</delta_ts>
            <desc>base.bbclass checks for multiple (or) licenses</desc>
            <filename>or_license.patch</filename>
            <type>text/plain</type>
            <size>1372</size>
            <attacher name="Andrei Gherzan">andrei</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL21ldGEvY2xhc3Nlcy9iYXNlLmJiY2xhc3MgYi9tZXRhL2NsYXNzZXMvYmFz
ZS5iYmNsYXNzCmluZGV4IGZiY2FlZmIuLjEwMTBiNWEgMTAwNjQ0Ci0tLSBhL21ldGEvY2xhc3Nl
cy9iYXNlLmJiY2xhc3MKKysrIGIvbWV0YS9jbGFzc2VzL2Jhc2UuYmJjbGFzcwpAQCAtNDAyLDgg
KzQwMiwyMSBAQCBweXRob24gKCkgewogICAgICAgICAgICAgICAgIGltcG9ydCByZQogICAgICA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