I tested BB_NO_NETWORK:layer-core = "1" and found that it does
not prevent the parse crash for the case where SRCREV is
completely missing.

The crash happens in srcrev_internal_helper() which raises
FetchError before any network access is attempted — so
BB_NO_NETWORK never gets checked. The BB_NO_NETWORK flag would
only help for the case where SRCREV is set to a floating
branch/tag and latest_revision() is called, since _lsremote()
calls check_network_access() there.

So it seems like two separate fixes are needed:

1. For missing SRCREV — something needs to prevent the parse
crash in srcrev_internal_helper(). Would it be appropriate
to check BB_NO_NETWORK in srcrev_internal_helper() itself
before raising FetchError?

2. For floating branch/tag — BB_NO_NETWORK:layer-core = "1"
would work.

On the OE-core side I have a simple QA check in insane.bbclass
using supports_srcrev() that fires at build time, which handles
the warning/error reporting cleanly.

Does this analysis make sense?

Best regards,
Sai Sneha


On Wed, 10 Jun 2026 at 11:09 AM, Sai Sneha via lists.openembedded.org
<[email protected]> wrote:

> Hi Richard,
>
> That makes sense if SRCREV is completely missing the recipe
> is unbuildable anyway, so the parse failure is an acceptable
> outcome for that case.
>
> So the complete solution would be:
> - BB_NO_NETWORK:layer-core = "1" in OE-core to prevent
> floating branch/tag lookups
> - A QA check in insane.bbclass to warn about missing SRCREV
> for external layers
> - yocto-check-layer catches parse failures during validation
>
> Is this the right direction?
>
> Best regards,
> Sai Sneha
>
>
> On Tue, 9 Jun 2026 at 5:11 PM, Richard Purdie <
> [email protected]> wrote:
>
>> On Tue, 2026-06-09 at 16:04 +0530, Sai Sneha wrote:
>> > Hi Richard,
>> >
>> > Please correct me if am wrong.
>> >   BB_NO_NETWORK:layer-core = "1"
>> > would work for the case where SRCREV is set to a floating
>> > branch or tag, since _lsremote() calls check_network_access()
>> > which raises NetworkAccess when BB_NO_NETWORK is set.
>> >
>> > However for the case where SRCREV is completely missing the
>> > crash happens earlier in srcrev_internal_helper() which raises
>> > FetchError before latest_revision() is even called so
>> > BB_NO_NETWORK wouldn’t catch that case.
>>
>> In that case the build fails to parse and is unbuildable? That is
>> probably fine as check-layer tests whether it parses?
>>
>> Cheers,
>>
>> Richard
>>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#238315): 
https://lists.openembedded.org/g/openembedded-core/message/238315
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