Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oelint.var.multiinclude does not support expanding variables #640

Open
skycaptain opened this issue Oct 25, 2024 · 1 comment
Open

oelint.var.multiinclude does not support expanding variables #640

skycaptain opened this issue Oct 25, 2024 · 1 comment
Labels
question Further information is requested

Comments

@skycaptain
Copy link
Contributor

Consider meta-montavista-cgx as an example of a pattern where an .inc file is included only when a certain variable is set: https://github.com/MontaVista-OpenSourceTechnology/meta-montavista-cgx/blob/4a74d7d1d956a3320e829eaec14e06036fa0307c/recipes-devtools/libunwind/libunwind_1.6.%25.bbappend

When this pattern is used across multiple bbappends, it triggers the following false positive: warning:oelint.var.multiinclude:'${PN}_mvista.inc' is included multiple times

This warning highlights two issues: First, it appears that this check operates at the global distro level instead of examining includes per recipe. Second, variables are not expanded, which would correctly resolve into unique include filenames.

@priv-kweihmann
Copy link
Owner

It is true that the include name is not expanded so far, still I don't get how that could result in any sort of warning here.
The linter will group files into logical groups (meaning recipe + matching bbappends), so unless there are multiple bbappends using this scheme that apply to a single recipe, the include statement in question should be parsed only once per group.

Please provide a minimal example on how warning is falsely raised.

@priv-kweihmann priv-kweihmann added the question Further information is requested label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants