I stand corrected. :) Thanks for the info, I was not aware of this change!
 
A bit OT: https://docs.yoctoproject.org/bitbake/dev/bitbake-user-manual/bitbake-user-manual-fetching.html#git-fetcher-git could use a update then, as it still states:
 
> “tag”: Specifies a tag to use for the checkout. To correctly resolve tags, BitBake must access the network. For that reason, tags are often not used. As far as Git is concerned, the “tag” parameter behaves effectively the same as the “rev” parameter.
 

https://docs.yoctoproject.org/bitbake/dev/bitbake-user-manual/bitbake-user-manual-fetching.html#git-fetcher-git
 
On Tue, May 6, 2025 at 01:17 PM, Gyorgy Sarvari wrote:
On 5/6/25 13:10, Jasper Orschulko via lists.openembedded.org wrote:
And add tag to SRC_URI.
AFAIK this is not possible / bad practise, unless there were some
recent changes to OE that I am unaware of.
There were some recent developments[1] in this front. Now tags and the
SRCREV are matched to each other, so you can be sure that the SRCREV is
correlated to PV, and they are not randomly set.

[1]: e.g.
https://git.openembedded.org/bitbake/commit/?id=d591d7633fe8d739ec00395920e44910b0b77e27

You can either specify "rev" directly in the SRC_URI or SRCREV, not
both. So if you set rev to a git tag in SRC_URI, you cannot set a git
commit hash within SRCREV, thus you lose reproducibility since you are
now only referencing a floating rev. See also:
https://stackoverflow.com/questions/78127309/how-to-set-srcrev-for-git-tag-in-yocto/78127354#78127354.
 
So setting the git commit hash in SRC_URI as rev or directly in SRCREV
is the way to go.