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

SCA_SPARE_LAYER doesn"t work on Kirkstone #11087

Open
Faduf opened this issue Mar 15, 2023 · 1 comment
Open

SCA_SPARE_LAYER doesn"t work on Kirkstone #11087

Faduf opened this issue Mar 15, 2023 · 1 comment
Labels
bug Something isn't working community Support has to be done by community help wanted Extra attention is needed

Comments

@Faduf
Copy link

Faduf commented Mar 15, 2023

Used layer

  • meta-sca layer branch kirkstone - last commit hash : 37a122e
  • poky branch kirkstone - last commit hash : c4e08719a782fd4119eaf643907b80cebf57f88f

Used configuration

  • configuration from the example meta-sca/tree/master/docs/conf/examples/img_complete.md
  • Option SCA_SPARE_LAYER = "core"

Describe the bug
I had the issue #11077 with sqlite3, which is a recipe from the core layer (poky/meta/recipe-support/sqlite3). I tried to use the option SCA_SPARE_LAYER = "core" to disable SCA over the complete core layer. Thus, I tried to build sqlite3 with bitbake sqlite3 and I still got the issue reported yesterday in #11077, which shows that SCA is not disabled for the core layer.

I checked into the sca.bbclass and I'm not sure about the if statement in line 20 if _allow_list and x not in _allow_list from the function def sca_files_part_of_unspared_layer(d, files):

With this if statement, if x is not in the allow list, the layer is not added to the _layer variable, thus if not any(_layer) statement returns the files and not any(_matches) in the if statement line 77 is False, the files are not spared.

Currently, it is need to add the option SCA_ALLOW_LAYER = "core" in addition to SCA_SPARE_LAYER = "core" to disable SCA on this layer, which seems to be wrong for me. I think that the if statement in line 20 should be if _allow_list and x in _allow_list. In this case the file won't be spared if the layer is in the allow list, which gives the priority to the SCA_ALLOW_LAYER option over the SCA_SPARE_LAYER option.

@Faduf Faduf added the bug Something isn't working label Mar 15, 2023
@priv-kweihmann
Copy link
Owner

26574b5 did that in master - feel free to contribute a PR to port that back to kirkstone - as announced in #8749 I’m not keeping the support of kirkstone up anymore

@priv-kweihmann priv-kweihmann added help wanted Extra attention is needed community Support has to be done by community labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Support has to be done by community help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants