All of lore.kernel.org
 help / color / mirror / Atom feed
* Switching a recipe between git head and git tag (for a release)
@ 2021-04-26 12:41 Martin Hollingsworth
  2021-04-26 14:35 ` [yocto] " Quentin Schulz
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Hollingsworth @ 2021-04-26 12:41 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Hello community,

I am looking for a best practice / a simple solution for switching the SRCREV in a bitbake recipe between git master HEAD (default, used in nightly builds) and a tagged release version (needed for a reproducible release config).



How can I minimize the amount of changes necessary to the recipe when switching to a release version?



Thanks and regards,

Martin


[-- Attachment #2: Type: text/html, Size: 2288 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [yocto] Switching a recipe between git head and git tag (for a release)
  2021-04-26 12:41 Switching a recipe between git head and git tag (for a release) Martin Hollingsworth
@ 2021-04-26 14:35 ` Quentin Schulz
  0 siblings, 0 replies; 2+ messages in thread
From: Quentin Schulz @ 2021-04-26 14:35 UTC (permalink / raw)
  To: Martin Hollingsworth; +Cc: yocto

Hi Martin,

On Mon, Apr 26, 2021 at 12:41:18PM +0000, Martin Hollingsworth wrote:
> Hello community,
> 
> I am looking for a best practice / a simple solution for switching the SRCREV in a bitbake recipe between git master HEAD (default, used in nightly builds) and a tagged release version (needed for a reproducible release config).
> 

Look how swupdate recipes are done in meta-swupdate:
https://github.com/sbabic/meta-swupdate/tree/master/recipes-support/swupdate

Basically all variants include the .inc file where everything in common is
specified.

Then the git recipe would point to your git master HEAD (I guess you\re
using AUTOREV mechanism?) and the point releases are e.g. foo_1.5.0.bb
where you put a given SRCREV only (or even a tarball if you want).

In the git recipe, add:

DEFAULT_PREFERENCE = "-1"

This means it'll never be preferred to other recipes (if there are
others).

For your nightly builds, you put PREFERRED_VERSION_foo = "git" in
local.conf and you should be good to go (don't add it for release builds
obviously :) ).

Hope that helps,
Cheers,
Quentin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-26 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 12:41 Switching a recipe between git head and git tag (for a release) Martin Hollingsworth
2021-04-26 14:35 ` [yocto] " Quentin Schulz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.