From 1ddbf8219807838ab8bb2a8bda314548bdab62d0 Mon Sep 17 00:00:00 2001 From: Andreas Cord-Landwehr Date: Sun, 7 Feb 2021 10:03:23 +0100 Subject: [PATCH] Disable license check per default --- classes/reuse_license_checksums.bbclass | 23 ++++++++++++----------- conf/layer.conf | 3 +++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/classes/reuse_license_checksums.bbclass b/classes/reuse_license_checksums.bbclass index 11ab6c8..4a527de 100644 --- a/classes/reuse_license_checksums.bbclass +++ b/classes/reuse_license_checksums.bbclass @@ -90,16 +90,17 @@ do_populate_lic_prepend() { print('Set LIC_FILES_CHKSUM from known SPDX files to:', d.getVar('LIC_FILES_CHKSUM')) # QA test for complete statement - src_licenses = os.listdir(os.path.join(srcdir, 'LICENSES/')) - for license_file in src_licenses: - # convert license_file to SPDX identifier - license_name = license_file - if license_name.endswith('.txt'): - license_name = license_name[:-4] + if d.getVar('KF5_REUSE_LICENSECHECK_ENABLED') and d.getVar('KF5_REUSE_LICENSECHECK_ENABLED') == '1': + src_licenses = os.listdir(os.path.join(srcdir, 'LICENSES/')) + for license_file in src_licenses: + # convert license_file to SPDX identifier + license_name = license_file + if license_name.endswith('.txt'): + license_name = license_name[:-4] - # compute list intersection and test if empty - if license_name in spdx_id_to_yocto_map: - if list(set(recipe_licenses) & set(spdx_id_to_yocto_map[license_name])): - continue - bb.warn("QA Issue: %s [%s]" % (license_name + " found in SRC but not in package license statement", "reuse_license")) + # compute list intersection and test if empty + if license_name in spdx_id_to_yocto_map: + if list(set(recipe_licenses) & set(spdx_id_to_yocto_map[license_name])): + continue + bb.warn("QA Issue: %s [%s]" % (license_name + " found in SRC but not in package license statement", "reuse_license")) } diff --git a/conf/layer.conf b/conf/layer.conf index f9b6a45..190c1c1 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -19,3 +19,6 @@ BBFILE_PRIORITY_kf5 = "6" LICENSE_PATH += "${LAYERDIR}/conf/licenses" LAYERSERIES_COMPAT_kf5 = "sumo thud warrior zeus dunfell" + +# disable check per default until all recipes are updated +KF5_REUSE_LICENSECHECK_ENABLED = "0"