From d33f32ceff31af1607abb823e54f413952f63f05 Mon Sep 17 00:00:00 2001 From: Luciano Dittgen Date: Wed, 11 Nov 2026 15:05:34 -0300 Subject: [PATCH] .oelint.cfg: Suppress oelint.var.licenseremotefile layer-wide Recipes whose only sources are files from this layer have no upstream license file to checksum. OE-Core points LIC_FILES_CHKSUM at ${COMMON_LICENSE_DIR} for such recipes, but oelint-adv flags any file:// path built from a variable other than WORKDIR, S or B, and the rule is unchanged up to 9.11.3. Suppress it for the whole layer so these recipes can use the common license text instead of shipping their own copy. Recipes that fetch a source still checksum the license file it ships. Tested with contrib/oelint/run-oelint.sh (no findings). Signed-off-by: Luciano Dittgen --- .oelint.cfg | 15 +++++++++++---- contrib/oelint/run-oelint.sh | 15 ++++++++------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.oelint.cfg b/.oelint.cfg index d98ccae..19d885d 100644 --- a/.oelint.cfg +++ b/.oelint.cfg @@ -1,12 +1,19 @@ # oelint-adv defaults for this layer. Auto-loaded when oelint-adv runs with this # directory as the working directory (see contrib/oelint/run-oelint.sh). # -# The only layer-wide suppression is oelint.var.bbclassextend: every recipe in -# this layer is target-only, so the "add BBCLASSEXTEND" suggestion never applies -# and would otherwise need a redundant inline comment on every single recipe. +# Layer-wide suppressions: +# * oelint.var.bbclassextend: every recipe in this layer is target-only, so the +# "add BBCLASSEXTEND" suggestion never applies and would otherwise need a +# redundant inline comment on every single recipe. +# * oelint.var.licenseremotefile: recipes whose only sources are files from +# this layer have no upstream license file to check, so they point +# LIC_FILES_CHKSUM at ${COMMON_LICENSE_DIR}, as OE-Core does for its own +# such recipes. Recipes that fetch a source must still checksum its license. # All other exceptions stay inline as '# nooelint: ' comments next to # the finding, so new recipes are always fully linted and each exception is # documented in place. [oelint] release = blacksail -suppress = oelint.var.bbclassextend +suppress = + oelint.var.bbclassextend + oelint.var.licenseremotefile diff --git a/contrib/oelint/run-oelint.sh b/contrib/oelint/run-oelint.sh index facd2a9..2d66f37 100755 --- a/contrib/oelint/run-oelint.sh +++ b/contrib/oelint/run-oelint.sh @@ -4,16 +4,17 @@ # All linter configuration is declarative and lives at the layer root, so this # script only has to enumerate the files (oelint-adv does not recurse into # directories): -# * .oelint.cfg - sets '--release' and the single layer-wide -# suppression (oelint.var.bbclassextend); auto-loaded -# from the working directory +# * .oelint.cfg - sets '--release' and the layer-wide suppressions +# (oelint.var.bbclassextend, +# oelint.var.licenseremotefile); auto-loaded from the +# working directory # * oelint.constants.json - the layer constant-DB additions, auto-loaded by # oelint-adv from the layer root (no --constantmods) # -# Aside from oelint.var.bbclassextend (which never applies to a target-only -# layer), exceptions stay inline as '# nooelint: ' comments next to the -# finding, so new recipes are always fully linted and each exception is -# documented in place (and flagged by oelint.file.inlinesuppress_na once stale). +# Aside from the layer-wide suppressions in .oelint.cfg, exceptions stay inline +# as '# nooelint: ' comments next to the finding, so new recipes are +# always fully linted and each exception is documented in place (and flagged by +# oelint.file.inlinesuppress_na once stale). set -eu # Neutralise CDPATH so 'cd' below can't print or jump to an unexpected dir.