[OE-core] [PATCH][resend] insane.bbclass: Warn if ${COREBASE}/LICENSE is used

Paul Eggleton paul.eggleton at linux.intel.com
Fri Sep 1 11:13:17 UTC 2017


Hi Saul

On Friday, 1 September 2017 10:40:58 AM NZST Saul Wold wrote:
> The top level LICENSE file is not actually a license, it refers
> other licenses that are used by Bitbake and Meta-data. Relying
> on this file could cause problems for recipes when this file
> changes, which it is about to.
> 
> Signed-off-by: Saul Wold <sgw at linux.intel.com>
> ---
>  meta/classes/insane.bbclass | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 479d39c..6d20eb6 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -659,7 +659,7 @@ python populate_lic_qa_checksum() {
>          sane = package_qa_handle_error("license-checksum", pn + ":
> Recipe file fetches files and does not have license file information
> (LIC_FILES_CHKSUM)", d)
>  
>      srcdir = d.getVar('S')
> -
> +    corebase_licensefile = d.getVar('COREBASE') + "/LICENSE"
>      for url in lic_files.split():
>          try:
>              (type, host, path, user, pswd, parm) =
> bb.fetch.decodeurl(url)
> @@ -670,6 +670,10 @@ python populate_lic_qa_checksum() {
>          if not os.path.isfile(srclicfile):
>              package_qa_handle_error("license-checksum", pn + ":
> LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d)
>              continue
> +        
> +        if (srclicfile == corebase_licensefile):
> +            bb.warn("${COREBASE}/LICENSE is not a valid license file,
> please use '${COMMON_LICENSE_DIR}/MIT' for a MIT License file in
> LIC_FILES_CHKSUM")
> +            bb.warn("This will become an error in the next release")

Can this be one bb.warn() call? Otherwise it's considered to be two warnings 
by the UI. Also, it's rare for us to even make such a comment in a warning, 
but I think we would say "in future" rather than "in the next release".

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list