From ea1a1beb25e155ea744b75d12925b04c499ba2af Mon Sep 17 00:00:00 2001 From: Luciano Dittgen Date: Mon, 31 Aug 2026 18:33:55 -0300 Subject: opencv: Declare PACKAGECONFIG-gated split packages via PACKAGES_DYNAMIC ${PN}-java, ${PN}-samples and python3-opencv enter PACKAGES only under the matching PACKAGECONFIG (java/oracle-java, samples, python3) through the bb.utils.contains() expressions in the PACKAGES assignment. oelint-adv parses the recipe without any PACKAGECONFIG active, so those expressions expand empty and it cannot see the packages, flagging their FILES/RDEPENDS/SUMMARY/INSANE_SKIP assignments as oelint.vars.specific ("set specific to a package not known from PACKAGES"). Extend the existing PACKAGES_DYNAMIC (which already covers ^libopencv-.*) with anchored patterns for the three conditionally-created packages, so they are recognised regardless of which PACKAGECONFIG the current parse enables. This does not add them to PACKAGES: a machine/config that enables the PACKAGECONFIG still ships them, one that does not still omits them. The top section of this recipe is a verbatim copy of meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.13.0.bb, which has the same limitation (its PACKAGES_DYNAMIC also covers only ^libopencv-.*). This PACKAGES_DYNAMIC extension is therefore a deliberate divergence from the meta-oe source, added to satisfy standalone linting; a future re-sync should keep it rather than revert to the upstream form. Removes 6 oelint.vars.specific findings; introduces none. Verified output-neutral on imx8mp-lpddr4-evk (PACKAGECONFIG enables samples and python3, so opencv-samples and python3-opencv are shipped): bitbake -e shows the effective PACKAGES set byte-identical before and after (only PACKAGES_DYNAMIC gains the three patterns), and a forced do_package rebuild produced a "No changes" buildhistory commit across all opencv outputs. Signed-off-by: Luciano Dittgen (cherry picked from commit ec983005e0b5aed2f7023dd9bd97c359402669b9) --- .../openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.bb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dynamic-layers') diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.bb index f20f8e42e..8f3010ce6 100644 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.bb +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.bb @@ -187,6 +187,12 @@ python populate_packages:prepend () { } PACKAGES_DYNAMIC += "^libopencv-.*" +# ${PN}-java, ${PN}-samples and python3-opencv are added to PACKAGES only under +# the matching PACKAGECONFIG (java/oracle-java, samples, python3) via the +# bb.utils.contains() expressions above. Declare them here so their +# FILES/RDEPENDS/SUMMARY/INSANE_SKIP assignments are recognised even when the +# current parse does not enable those PACKAGECONFIG options. +PACKAGES_DYNAMIC += "^${PN}-java$ ^${PN}-samples$ ^python3-opencv$" # Main package is intentionally empty (see ALLOW_EMPTY below); everything is # split into the sub-packages and the PACKAGES_DYNAMIC libopencv-* packages. -- cgit v1.2.3-54-g00ecf