All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 04/11] licenses: Fix canonical license for 'or-later' handling
Date: Thu, 18 Feb 2021 16:56:39 +0000	[thread overview]
Message-ID: <20210218165646.2109894-4-richard.purdie@linuxfoundation.org> (raw)
In-Reply-To: <20210218165646.2109894-1-richard.purdie@linuxfoundation.org>

GPLv2 and GPLv2+ are two difference licenses with different meanings
and we can't just pretend they're the same thing. Change the code
to treat them separately.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/license.bbclass | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index dc91118340d..358c716a801 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -252,16 +252,9 @@ def return_spdx(d, license):
 def canonical_license(d, license):
     """
     Return the canonical (SPDX) form of the license if available (so GPLv3
-    becomes GPL-3.0), for the license named 'X+', return canonical form of
-    'X' if available and the tailing '+' (so GPLv3+ becomes GPL-3.0+),
-    or the passed license if there is no canonical form.
+    becomes GPL-3.0) or the passed license if there is no canonical form.
     """
-    lic = d.getVarFlag('SPDXLICENSEMAP', license) or ""
-    if not lic and license.endswith('+'):
-        lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'))
-        if lic:
-            lic += '+'
-    return lic or license
+    return d.getVarFlag('SPDXLICENSEMAP', license) or license
 
 def available_licenses(d):
     """
-- 
2.27.0


  parent reply	other threads:[~2021-02-18 16:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 16:56 [PATCH 01/11] licenses: Update license file to match current SPDX names Richard Purdie
2021-02-18 16:56 ` [PATCH 02/11] recipes: Update common-licenses references to match new names Richard Purdie
2021-02-18 16:56 ` [PATCH 03/11] licenses.conf: Add missing 'or-later' mappings Richard Purdie
2021-02-18 19:05   ` [OE-core] " Peter Kjellerstedt
2021-02-18 16:56 ` Richard Purdie [this message]
2021-02-18 16:56 ` [PATCH 05/11] licenses: Update INCOMPATIBLE_LICENSE for 'or-later' handling Richard Purdie
2021-02-19 10:13   ` [OE-core] " Quentin Schulz
2021-02-19 10:43     ` Richard Purdie
2021-02-18 16:56 ` [PATCH 06/11] license_image: Don't canonicalise INCOMPATIBLE_LICENSE Richard Purdie
2021-02-18 16:56 ` [PATCH 07/11] license_image: Do canonicalise package license Richard Purdie
2021-02-18 16:56 ` [PATCH 08/11] selftest/incompatible_lic: Update the tests after the 'or-later' license handling changes Richard Purdie
2021-02-18 16:56 ` [PATCH 09/11] xorg-minimal-fonts: Really fix determinism Richard Purdie
2021-02-18 16:56 ` [PATCH 10/11] groff: Fix determinism issue Richard Purdie
2021-02-18 16:56 ` [PATCH 11/11] git: Fix determnism issue Richard Purdie
2021-02-18 19:02 ` [OE-core] [PATCH 01/11] licenses: Update license file to match current SPDX names Peter Kjellerstedt

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=20210218165646.2109894-4-richard.purdie@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.