packagegroup.bbclass: set LICENSE and LIC_FILES_CHKSUM

* Use "??=" in bitbake.conf to set LICENSE, so that it can overrided by
  packagegroup.bbclass and recipes.

* Use "?=" to set LICENSE and LIC_FILES_CHKSUM to MIT by default
  in packagegroup.bbclass, this won't impact any packagegroup recipes
  which use non-MIT license, since they can be overrided by the recipe.

(From OE-Core rev: a4aa5d9f4adb41f3f3bf3cea62f3e69204ca0b73)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang
2016-04-26 19:20:27 -07:00
committed by Richard Purdie
parent a8b35766d4
commit d38c92376c
2 changed files with 6 additions and 1 deletions

View File

@@ -14,6 +14,11 @@ PACKAGE_ARCH ?= "all"
# Fully expanded - so it applies the overrides as well
PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
LICENSE ?= "MIT"
LIC_FILES_CHKSUM ?= "${@oe.utils.ifelse(d.getVar('LICENSE', True) == 'MIT', \
'file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420', \
'')}"
inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
# This automatically adds -dbg and -dev flavours of all PACKAGES

View File

@@ -247,7 +247,7 @@ SUMMARY_${PN}-doc ?= "${SUMMARY} - Documentation files"
DESCRIPTION_${PN}-doc ?= "${DESCRIPTION} \
This package contains documentation."
LICENSE = "INVALID"
LICENSE ??= "INVALID"
MAINTAINER = "OE-Core Developers <openembedded-core@lists.openembedded.org>"
HOMEPAGE = ""