> -----Original Message----- > From: openembedded-core@lists.openembedded.org <openembedded- > c...@lists.openembedded.org> On Behalf Of Konrad Weihmann > Sent: den 23 september 2021 10:24 > To: Saul Wold <saul.w...@windriver.com>; openembedded- > c...@lists.openembedded.org; jpewhac...@gmail.com > Subject: Re: [OE-core] [PATCH] create-spdx: Don't collect natives sources > > > > On 23.09.21 00:14, Saul Wold wrote: > > When the collect_dep_sources() runs, it collects sources from both > native > > and non-native recipes. Later when the GENERATED_FROM matching occurs it > > may find the file (via checksum) from the native recipe since it's the > > same checksum as the target file. The that are generated DocumentRefs > > point to the native recipe rather than the target recipe DocumentRef. > > > > Signed-off-by: Saul Wold <saul.w...@windriver.com> > > --- > > meta/classes/create-spdx.bbclass | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create- > spdx.bbclass > > index 3c73c21c04..8f7fae43f1 100644 > > --- a/meta/classes/create-spdx.bbclass > > +++ b/meta/classes/create-spdx.bbclass > > @@ -336,6 +336,10 @@ def collect_dep_sources(d, dep_recipes): > > > > sources = {} > > for dep in dep_recipes: > > + # Don't collect sources from native recipes as they > > + # match non-native sources also. > > + if "-native" in dep.recipe.name: > > That looks a bit too fuzzy to me - I would have expected > > if dep.recipe.name.endswith("-native"): > > here. Otherwise this is very prone to false positives
Absolutely. E.g., we have a recipe called crate-native-tls for the native-tls Rust crate. At the same time I hate all these hardcoded tests for recipe types all over OE Core as they assume only the types that are in OE Core exist without any (easy) way of extending the tests for non-OE Core recipe types. Would it instead be possible to add the is_native in do_create_spdx() to the recipe object so that it is available here? > > + continue > > recipe_files = set(dep.recipe.hasFiles) > > > > for spdx_file in dep.doc.files: //Peter
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#156263): https://lists.openembedded.org/g/openembedded-core/message/156263 Mute This Topic: https://lists.openembedded.org/mt/85801677/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-