Re: How to insure SRCREV is consistent with PV

Martin Jansa


the fetch is still executed in do_fetch task (and uses MIRROR/PREMIRROR etc), maybe you mean the 2nd fetch when the tag doesn't exist in specified branch added here:
and that's executed only when needed (in case the tag WEBOS_VERSION points to was pushed to repo, before the branch was created - at least that was the case almost 10 years ago, there is longer history in old openwebos/meta-webos repo:


On Wed, Aug 10, 2022 at 4:16 PM Philippe Midol-Monnet <philippe.midol-monnet@...> wrote:

Thanks for your answer.

Reading your code, I wonder why you need to do a fetch, it looks very resource consuming.


On Tue, 9 Aug 2022 at 11:27, Martin Jansa <martin.jansa@...> wrote:
In webOS we use do_unpack postinst which checks that the SRCREV matches with the expected tag name and that the tag is annotated, see

Then for our own components (mostly using CMake) we also pass the version from the recipe into CMake:
which is then compared with the version inside the component source during the build:
so you cannot claim different version even if you tag matches it.

It's a bit more complicated, because we use WEBOS_VERSION variable which is then split into PV (VERSION + SUBMISSION) and SRCREV,
but with enforced consistency across all our components this worked quite well.


On Tue, Aug 9, 2022 at 11:00 AM Philippe Midol-Monnet <philippe.midol-monnet@...> wrote:

Since the last version of bibake it looks like SRCREV must be set with a SHA1 in order to fetch source from a git repository. We previously set it with a tag corresponding to PV.
Manually retrieving the sha1 of the commit of a tag can easily lead to mistakes.

Is there a way to ensure that the SRCREV is consistent with  PV?



Join to automatically receive all group messages.