On Fri, 2023-08-18 at 16:01 +0000, Peter Kjellerstedt wrote: > > I think we can live without it. If I am not mistaken we can always > inject our extra information by doing something like > PKGV:append = "${MAINTPV}" in recipes where we need it and then rely on > your code to add the SHA-1 if the output from ${MAINTPV} includes a "+". > > > I'm deliberately trying to avoid putting > > the function call into a variable as it then becomes part of the task > > hash computations. This means there are calls into it during parsing > > rather than at runtime. That was part of the pain in the previous > > approach and something I'm keen to avoid this time around to simplify > > things if we can. It does get included in the taskhashes after the > > changes but at points we control (vardepvalue) rather than 'random' > > expansion points of a common variable like PV during parsing. > > I am a bit unsure about the trying to avoid calls to the get_pkgv_string() > function during parsing, because it seems to happen with the current > code. When I first added your changes, I got errors for a number of > recipes in meta-oe that failed to set SRCREV_FORMAT (Khem has since > corrected those recipes). E.g., if you add meta-oe to the build and > revert commit 4228656bae, then you will get the following error if > you run `bitbake -p`: > > WARNING: .../meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb: Exception > during build_dependencies for fetcher_hashes_dummyfunc > WARNING: .../meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb: Error during > finalise of > /home/pkj/dists/poky-master/meta-oe/recipes-extended/sysdig/sysig_0.28.0.bb > ERROR: ExpansionError during parsing > .../meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb
It will happen, we're just making it happen at a point of our choosing rather than the current situation where it happens when PV happens to be expanded, which could be anywhere during parsing. > This is causing problems for me in our code base because we have a > number of recipes that fetch from Git repositories with restricted > access that I cannot fetch (we have alternative recipes that install > prebuilt binaries for those of us without access to the source code). > Now all those recipes fail during parsing because bitbake cannot run > `git ls-remote`, even if they will never be built in my builds. I suspect that isn't from get_pkgv_string but from get_hashvalue? If so, I'd suggest your "internal only" recipes need to raise SkipRecipe() if they can't function and that should avoid the issue. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1739): https://lists.openembedded.org/g/openembedded-architecture/message/1739 Mute This Topic: https://lists.openembedded.org/mt/100618420/21656 Group Owner: openembedded-architecture+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-