summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano Dittgen <luciano.dittgen@ossystems.com.br>2026-07-15 10:08:36 -0300
committerLuciano Dittgen <luciano.dittgen@ossystems.com.br>2026-07-17 09:18:19 -0300
commit6d97362cb1d8e88d7f8810cc2959b294ec8bdb8a (patch)
treefbed268e6b7538ee1e115f45b55110fce2eb297b
parent5da7f122bb22387e44f613aed7321cad1c52d926 (diff)
downloadmeta-freescale-6d97362cb1d8e88d7f8810cc2959b294ec8bdb8a.tar.gz
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 <luciano.dittgen@ossystems.com.br>
-rw-r--r--classes/fsl-eula-unpack.bbclass6
1 files changed, 5 insertions, 1 deletions
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}
133 133
134LIC_FILES_CHKSUM_LAYER ?= "file://${FSL_EULA_FILE};md5=${FSL_EULA_FILE_MD5SUM}" 134LIC_FILES_CHKSUM_LAYER ?= "file://${FSL_EULA_FILE};md5=${FSL_EULA_FILE_MD5SUM}"
135LIC_FILES_CHKSUM_LAYER[vardepsexclude] += "FSL_EULA_FILE" 135LIC_FILES_CHKSUM_LAYER[vardepsexclude] += "FSL_EULA_FILE"
136# The EULA text is shipped by the layer (FSL_EULA_FILE), not the recipe source
137# tree, so this reference intentionally points outside the sources.
138# nooelint: oelint.var.licenseremotefile
136LIC_FILES_CHKSUM:append = " ${LIC_FILES_CHKSUM_LAYER}" 139LIC_FILES_CHKSUM:append = " ${LIC_FILES_CHKSUM_LAYER}"
137 140
138LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE" 141LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE"
139 142
140do_fetch:prepend() { 143python do_fetch:prepend() {
141 if "Proprietary" not in d.getVar("LICENSE"): 144 if "Proprietary" not in d.getVar("LICENSE"):
142 bb.fatal("The recipe LICENSE should include Proprietary but is " + d.getVar("LICENSE") + ".") 145 bb.fatal("The recipe LICENSE should include Proprietary but is " + d.getVar("LICENSE") + ".")
143} 146}
@@ -164,6 +167,7 @@ python do_unpack() {
164 bb.build.exec_func('fsl_bin_do_unpack', d) 167 bb.build.exec_func('fsl_bin_do_unpack', d)
165} 168}
166 169
170fsl_bin_do_unpack[doc] = "Unpack the EULA-gated SRC_URI entries after the EULA has been accepted"
167python fsl_bin_do_unpack() { 171python fsl_bin_do_unpack() {
168 src_uri = (d.getVar('SRC_URI') or "").split() 172 src_uri = (d.getVar('SRC_URI') or "").split()
169 if len(src_uri) == 0: 173 if len(src_uri) == 0: