All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/4] base.bbclass: avoid duplicate call to d.getVar('LICENSE', True)
Date: Thu, 31 Mar 2016 11:13:07 -0700	[thread overview]
Message-ID: <1459447989-25263-3-git-send-email-armccurdy@gmail.com> (raw)
In-Reply-To: <1459447989-25263-1-git-send-email-armccurdy@gmail.com>

Reuse the 'license' variable, instead of calling
d.getVar('LICENSE', True) again.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/classes/base.bbclass | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index ab8715e..67b3370 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -516,7 +516,6 @@ python () {
                         incompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
 
             if not pn in whitelist:
-                recipe_license = d.getVar('LICENSE', True)
                 pkgs = d.getVar('PACKAGES', True).split()
                 skipped_pkgs = []
                 unskipped_pkgs = []
@@ -528,14 +527,14 @@ python () {
                 all_skipped = skipped_pkgs and not unskipped_pkgs
                 if unskipped_pkgs:
                     for pkg in skipped_pkgs:
-                        bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it's " + recipe_license)
+                        bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it's " + license)
                         mlprefix = d.getVar('MLPREFIX', True)
                         d.setVar('LICENSE_EXCLUSION-' + mlprefix + pkg, 1)
                     for pkg in unskipped_pkgs:
                         bb.debug(1, "INCLUDING the package " + pkg)
                 elif all_skipped or incompatible_license(d, bad_licenses):
-                    bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license))
-                    raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license)
+                    bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license))
+                    raise bb.parse.SkipPackage("incompatible with license %s" % license)
             elif pn in whitelist:
                 if pn in incompatwl:
                     bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
-- 
1.9.1



  parent reply	other threads:[~2016-03-31 18:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 18:13 [PATCH 0/4] drop obsolete HOSTTOOLS_WHITELIST_GPL-3.0 etc Andre McCurdy
2016-03-31 18:13 ` [PATCH 1/4] base.bbclass: drop obsolete HOSTTOOLS_WHITELIST_GPL-3.0 Andre McCurdy
2016-03-31 18:13 ` Andre McCurdy [this message]
2016-03-31 18:13 ` [PATCH 3/4] base.bbclass: include PV in 'incompatible license but whitelisted' debug Andre McCurdy
2016-04-15  6:19   ` Richard Purdie
2016-04-15 22:26     ` Andre McCurdy
2016-03-31 18:13 ` [PATCH 4/4] base.bbclass: minor logic simplification Andre McCurdy

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=1459447989-25263-3-git-send-email-armccurdy@gmail.com \
    --to=armccurdy@gmail.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 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.