All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set
Date: Mon,  9 May 2016 11:58:10 +1200	[thread overview]
Message-ID: <0348ef35090a51cf4f89fd3beec3e730b4a4d7ff.1462751689.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1462751689.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1462751689.git.paul.eggleton@linux.intel.com>

Recipes such as images and packagegroups don't actually fetch or build
any source, so there's really no point having LIC_FILES_CHKSUM set.
Forcing users to set it (as we have done for images inheriting
image.bbclass) just makes things more difficult for the user for no
discernable benefit. The easiest way to adjust this check is simply to
skip it if SRC_URI is not set since this is a pretty good indicator that
no source is being pulled in.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/insane.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 097dc3a..0b151c2 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -681,15 +681,15 @@ python populate_lic_qa_checksum() {
     import tempfile
     sane = True
 
-    lic_files = d.getVar('LIC_FILES_CHKSUM', True)
+    lic_files = d.getVar('LIC_FILES_CHKSUM', True) or ''
     lic = d.getVar('LICENSE', True)
     pn = d.getVar('PN', True)
 
     if lic == "CLOSED":
         return
 
-    if not lic_files:
-        package_qa_handle_error("license-checksum", pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)", d)
+    if not lic_files and d.getVar('SRC_URI', True):
+        package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
         return
 
     srcdir = d.getVar('S', True)
-- 
2.5.5



  reply	other threads:[~2016-05-08 23:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08 23:58 [PATCH 0/2] More reasonable LIC_FILES_CHKSUM enforcement Paul Eggleton
2016-05-08 23:58 ` Paul Eggleton [this message]
2016-05-08 23:58 ` [PATCH 2/2] Drop unneeded LIC_FILES_CHKSUM values 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=0348ef35090a51cf4f89fd3beec3e730b4a4d7ff.1462751689.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@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 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.