On Mon, 2026-07-13 at 12:32 +0100, Jose Quaresma wrote: > On Sat, Jul 11, 2026 at 9:38 PM Richard Purdie > <[email protected]> wrote: > > On Fri, 2026-07-10 at 16:57 +0100, Jose Quaresma via lists.openembedded.org > > wrote: > > > BUILD_ID is defined using a weak assignment so that we can modify it > > > externally. However, if we do it, we also need to do the same thing > > > for BUILD_ID[vardepsexclude] with the new value we assigned to > > > BUILD_ID. > > > > > > Signed-off-by: Jose Quaresma <[email protected]> > > > --- > > > meta/recipes-core/os-release/os-release.bb | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/meta/recipes-core/os-release/os-release.bb > > > b/meta/recipes-core/os-release/os-release.bb > > > index e1906d05d8..bbbf9e3e11 100644 > > > --- a/meta/recipes-core/os-release/os-release.bb > > > +++ b/meta/recipes-core/os-release/os-release.bb > > > @@ -41,7 +41,7 @@ CPE_DISTRO ??= "${DISTRO}" > > > CPE_NAME = "cpe:/o:openembedded:${CPE_DISTRO}:${VERSION_ID}" > > > > > > BUILD_ID ?= "${DATETIME}" > > > -BUILD_ID[vardepsexclude] = "DATETIME" > > > +BUILD_ID[vardepsexclude] ?= "DATETIME" > > > > > > > I'm a bit surprised you can't just append to it and leave DATETIME in > > there regardless of whether it is still used or not... > > > > > I can't use '+=' in my conf/local.conf because '=' on the recipe has > precedence. > I also can't use the 'append' because it doesn't work with flags. > > I guess I only have the chance to use os-release.bbappend left. > However, to maintain the layer YP compatible, I need to use an override, > and this implies the use of another variable. > > MY_BUILD_ID = "my-build-id" > > MY_BUILD_ID_AUX:override = "${MY_BUILD_ID}" > BUILD_ID = "${MY_BUILD_ID_AUX}" > BUILD_ID[vardepsexclude] += "MY_BUILD_ID_AUX" > > However, I didn't want to have this in a bbappend because it's not very > elegant > and this is mostly meant to be used only in CI. > > There might be another way to do this, but I don't see how without using the > weak assignment.
You're right and I was just thinking about this from quite the right perspective, sorry! :) Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#240840): https://lists.openembedded.org/g/openembedded-core/message/240840 Mute This Topic: https://lists.openembedded.org/mt/120209165/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
