On Tue, 2026-06-09 at 14:49 +0530, Sai Sneha via lists.openembedded.org
wrote:
> Following up on the suggestions to fix this in the BitBake 
> fetchers using supports_srcrev(), I have tried implementing that 
> approach locally. Here is what I did and how it works.
> 
> The fix has two parts:
> 
> Part 1 — BitBake fix (prevent parse crash):
> The crash happens in setup_revisions() when srcrev_internal_helper() 
> raises a FetchError for missing SRCREV. This propagates up through 
> expandWithRefs() as an ExpansionError which halts parsing for all 
> recipes. The fix catches FetchError in setup_revisions() and sets 
> a missing_srcrev flag on the FetchData object:
> 
> def setup_revisions(self, d):
> try:
> self.revision = srcrev_internal_helper(self, d, self.name)
> except FetchError:
> self.revision = None
> self.missing_srcrev = True
> 
> git.py and hg.py also needed a guard to prevent calling 
> latest_revision() when missing_srcrev is set, since that would 
> trigger a live network fetch under BB_NO_NETWORK=1.

That is going to break some of our other protections for invalid SRCREV
setups and swallow other errors.

How about instead we set a flag in OE-Core on a per layer basis:

BB_FETCH_REQUIRE_DETERMINISM:layer-core = "1"

and this simply changes the fetcher behaviour to error if it would
touch the network?

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#238283): 
https://lists.openembedded.org/g/openembedded-core/message/238283
Mute This Topic: https://lists.openembedded.org/mt/119719972/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to