From 6d97362cb1d8e88d7f8810cc2959b294ec8bdb8a Mon Sep 17 00:00:00 2001 From: Luciano Dittgen Date: Wed, 15 Jul 2026 10:08:36 -0300 Subject: fsl-eula-unpack: Fix do_fetch prepend prefix and document findings per oelint Address the oelint-adv findings for this class: - Add the missing 'python' prefix to do_fetch:prepend (task.pythonprefix). do_fetch is a python task and the prepend body is python (it calls d.getVar and bb.fatal), but the 'python' keyword was lost when the _prepend -> :prepend override-syntax conversion rewrote the header, so the LICENSE validation was an ill-formed shell fragment. Restoring the prefix makes it a proper python fragment again. Not build-tested here; the check passes for every Proprietary-licensed EULA recipe and only errors on misuse, so it is safe. - Suppress var.licenseremotefile on LIC_FILES_CHKSUM:append: the EULA text is shipped by the layer (FSL_EULA_FILE), not the recipe source tree, so the reference intentionally points outside the sources. - Set a task[doc] docstring on the fsl_bin_do_unpack helper (task.docstrings). bbclass.underscores on the class filename is handled by the layer-wide suppression. Signed-off-by: Luciano Dittgen --- classes/fsl-eula-unpack.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/fsl-eula-unpack.bbclass b/classes/fsl-eula-unpack.bbclass index ee938a74d..7ac54734f 100644 --- a/classes/fsl-eula-unpack.bbclass +++ b/classes/fsl-eula-unpack.bbclass @@ -133,11 +133,14 @@ FSL_EULA_FILE_MD5SUM ?= "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V63} LIC_FILES_CHKSUM_LAYER ?= "file://${FSL_EULA_FILE};md5=${FSL_EULA_FILE_MD5SUM}" LIC_FILES_CHKSUM_LAYER[vardepsexclude] += "FSL_EULA_FILE" +# The EULA text is shipped by the layer (FSL_EULA_FILE), not the recipe source +# tree, so this reference intentionally points outside the sources. +# nooelint: oelint.var.licenseremotefile LIC_FILES_CHKSUM:append = " ${LIC_FILES_CHKSUM_LAYER}" LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE" -do_fetch:prepend() { +python do_fetch:prepend() { if "Proprietary" not in d.getVar("LICENSE"): bb.fatal("The recipe LICENSE should include Proprietary but is " + d.getVar("LICENSE") + ".") } @@ -164,6 +167,7 @@ python do_unpack() { bb.build.exec_func('fsl_bin_do_unpack', d) } +fsl_bin_do_unpack[doc] = "Unpack the EULA-gated SRC_URI entries after the EULA has been accepted" python fsl_bin_do_unpack() { src_uri = (d.getVar('SRC_URI') or "").split() if len(src_uri) == 0: -- cgit v1.2.3-54-g00ecf