Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] license.bbclass: do not process LICENSE_pn variables
Date: Fri, 27 May 2016 12:07:52 +0200	[thread overview]
Message-ID: <20160527100752.GA2570@jama> (raw)
In-Reply-To: <1464330370-6856-1-git-send-email-markus.lehtonen@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2833 bytes --]

On Fri, May 27, 2016 at 09:26:10AM +0300, Markus Lehtonen wrote:
> The loop iterating over LICENSE_pn variables has never worked. In
> addition, the LICENSE variable is supposed to contain all licenses
> defined in LICENSE_pn variables.

Is this really true?

I've seen couple examples where LICENSE variable is used as a "default"
for most packages, and then only 1 package sets different LICENSE_pn.

Changing the semantics as you said would force people to define
LICENSE_pn-dev
LICENSE_pn-staticdev
LICENSE_pn
LICENSE_pn-dbg
to foo when they have just one file in
LICENSE_pn-blah
which containd unwanted LICENSE bar

And then overall license will be "foo & bar"

There are real-world examples where there is one GPLv3 shell script we
don't even need in LGPLv2 component - for now it was simple to move this
script to separate package and set just LICENSE_pn-blah-script

> Thus, it is simpler just to use LICENSE
> as the data we get is essentially the same.
> 
> [YOCTO #9499]
> 
> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
> ---
>  meta/classes/license.bbclass | 16 +---------------
>  1 file changed, 1 insertion(+), 15 deletions(-)
> 
> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> index 69335d6..eacf9e8 100644
> --- a/meta/classes/license.bbclass
> +++ b/meta/classes/license.bbclass
> @@ -376,20 +376,6 @@ def find_license_files(d):
>      import shutil
>      import oe.license
>  
> -    pn = d.getVar('PN', True)
> -    for package in d.getVar('PACKAGES', True):
> -        if d.getVar('LICENSE_' + package, True):
> -            license_types = license_types + ' & ' + \
> -                            d.getVar('LICENSE_' + package, True)
> -
> -    #If we get here with no license types, then that means we have a recipe 
> -    #level license. If so, we grab only those.
> -    try:
> -        license_types
> -    except NameError:        
> -        # All the license types at the recipe level
> -        license_types = d.getVar('LICENSE', True)
> - 
>      # All the license files for the package
>      lic_files = d.getVar('LIC_FILES_CHKSUM', True)
>      pn = d.getVar('PN', True)
> @@ -487,7 +473,7 @@ def find_license_files(d):
>  
>      v = FindVisitor()
>      try:
> -        v.visit_string(license_types)
> +        v.visit_string(d.getVar('LICENSE', True))
>      except oe.license.InvalidLicense as exc:
>          bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
>      except SyntaxError:
> -- 
> 2.6.6
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

  reply	other threads:[~2016-05-27 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27  6:26 [PATCH] license.bbclass: do not process LICENSE_pn variables Markus Lehtonen
2016-05-27 10:07 ` Martin Jansa [this message]
2016-05-30 11:26   ` Markus Lehtonen
2016-05-30 21:27     ` Paul Eggleton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160527100752.GA2570@jama \
    --to=martin.jansa@gmail.com \
    --cc=markus.lehtonen@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox