public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Moessbauer, Felix" <felix.moessbauer@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Bezdeka, Florian" <florian.bezdeka@siemens.com>,
	"Kiszka, Jan" <jan.kiszka@siemens.com>,
	"Schild, Henning" <henning.schild@siemens.com>
Subject: Re: Conditional weak assignments behave unexpectedly
Date: Sun, 23 Apr 2023 09:11:04 +0000	[thread overview]
Message-ID: <38c5bb28f2ecd5e794b7d3dcd4b3fbfa0793ad69.camel@siemens.com> (raw)
In-Reply-To: <989e781863ed449603493e574cce32581f69b292.camel@siemens.com>

On Sun, 2023-04-23 at 07:48 +0000, 'Moessbauer, Felix' via isar-users
wrote:
> Dear developers,
> 
> I just stumbled upon the following pattern, which needs further
> investigation:
> 
> - use the qemuamd64 machine on debian-bullseye
> - define a custom WKS_FILE in local.conf
> 
> While the qemuamd64.conf file contains the following line:
> WKS_FILE:debian-bullseye ?= "sdimage-efi-btrfs"
> I expected that I'm able to override that unconditionally in the
> local.conf using: WKS_FILE = "foo.wks"
> 
> However, the final value of the WKS_FILE variable is "sdimage-efi-
> btrfs". In the bitbake documentation, I cannot find any example of
> combining weak assignments and overrides. However, the implementation
> seems to evaluate the weak assignment on the override first. Then,
> the
> WKS_FILE part from the local conf is evaluated and finally the
> WKS_FILE:debian-bullseye overrides what was in WKS_FILE. This
> suspicion
> is also backed by the following test:
> 
> local.conf: WKS_FILE:debian-bullseye = "foo.wks"
> Now, the final value of WKS_FILE is "foo.wks".
> 
> I'm unsure if that has ever been like that and was just unnoticed, or
> if the behavior change was introduced in bitbake 2.0.
> Anyways, we must not use overrides in combination with weak
> assignments. And we also need to fix that on the qemuamd64 machine
> config immediately (even if we loose some tests by doing that).
> Otherwise it is impossible to override the WKS_FILE of the qemuamd64
> machine.

I just checked where this pattern is used in meta and meta-isar. There
are quite some occurrences. However, all except for the WKS_FILE seem
to be never customized anyways. With ack and this regex, you can check
by yourself (also in downstream layers).

Felix

ack '[A-Z]+:[a-z0-9-]+\s*\?=' meta meta-isar/
meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
21:SBUILD_CHROOT_PREINSTALL:riscv64 ?= " \

meta/conf/bitbake.conf
66:KERNEL_FILE:mipsel ?= "vmlinux"
67:KERNEL_FILE:riscv64 ?= "vmlinux"
68:KERNEL_FILE:arm64 ?= "vmlinux"

meta-isar/conf/machine/qemuarm64.conf
7:KERNEL_NAME:ubuntu-focal ?= "generic"

meta-isar/conf/machine/qemuamd64.conf
7:KERNEL_NAME:ubuntu-focal ?= "generic"
13:WKS_FILE:ubuntu-focal ?= "sdimage-efi-sd"
16:WKS_FILE:debian-bullseye ?= "sdimage-efi-btrfs"

meta-isar/conf/distro/ubuntu-focal.conf
13:DISTRO_APT_SOURCES:arm64 ?= "conf/distro/${BASE_DISTRO}-
${BASE_DISTRO_CODENAME}-ports.list"
14:HOST_DISTRO_APT_SOURCES:arm64 ?= "conf/distro/${HOST_DISTRO}.list
conf/distro/${HOST_DISTRO}-ports.list"

meta-isar/conf/distro/raspios-bullseye.conf
16:DISTRO_APT_SOURCES:arm64 ?= "conf/distro/raspios-bullseye-64.list"

> 
> Best regards,
> Felix
> 


  reply	other threads:[~2023-04-23  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23  7:48 Moessbauer, Felix
2023-04-23  9:11 ` Moessbauer, Felix [this message]
2023-04-24 13:28   ` Henning Schild
2023-04-27  6:58 ` Anton Mikanovich
2023-04-28 19:12 ` Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38c5bb28f2ecd5e794b7d3dcd4b3fbfa0793ad69.camel@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox