[OE-core] [PATCH v2 1/2] classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set

Khem Raj raj.khem at gmail.com
Mon May 9 23:29:43 UTC 2016


> On May 9, 2016, at 3:25 PM, Paul Eggleton <paul.eggleton at linux.intel.com> wrote:
> 
> 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.

Looks fine idea. May be we also need to improve docs for LIC_FILES_CHKSUM

LIC_FILES_CHKSUM[doc] = "Checksums of the license text in the recipe source code.”

someone new can think the sources referred to are recipe source itself.

> 
> Signed-off-by: Paul Eggleton <paul.eggleton at 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
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160509/da1f27a1/attachment-0002.sig>


More information about the Openembedded-core mailing list