Re: [yocto] Modifying SRC_URI before it is parsed by the fetcher
Quentin Schulz <[email protected]> Tue, 12 May 2026 18:13:41 +0200
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
Hi Antti, On 5/12/26 6:05 PM, EXT-Antti Gärding via lists.yoctoproject.org wrote: > You don't often get email from [email protected]. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> >> Please explain the problem first, before presenting the various > solution attempts. What do you need to modify in SRC_URI and why? > Maybe there's a completely different approach to the actual issue. > > I want to add a tag parameter to one of the URIs under certain conditions so that bitbake can check that the commit matching the rev parameter has that tag. The tag check is already there in bitbake. > Which conditions? The following pseudocode could help (untested). def src_uri_tag(d): if conditions: return ';tag=' + mytag return '' SRC_URI_TAG = "${@src_uri_tag(d)}" SRC_URI = "git://someforge.co/myrepo.git;branch=main${SRC_URI_TAG}" Cheers, Quentin