On Fri, Dec 22, 2023 at 3:46 AM Adrian Freihofer <adrian.freiho...@gmail.com> wrote: > > On Fri, 2023-12-22 at 10:25 +0000, Ross Burton via > lists.openembedded.org wrote: > > On 22 Dec 2023, at 04:59, Chen Qi via lists.openembedded.org > > <Qi.Chen=windriver....@lists.openembedded.org> wrote: > > > > One of the major things that comes up frequently is that the > > > > PACKAGECONFIG for a recipe needs to be modified to remove some > > > > incompatible flag from the default options. This particular > > > > option is > > > > not very simple though, because most recipes set PACKAGECONFIG > > > > using > > > > the "deferred weak" assignment, as in `PACKAGECONFIG ??= "foo > > > > bar"`. > > > > Because of this, any operation that attempts to modify this > > > > variable > > > > will overwrite the default; commonly one might like to do > > > > something > > > > like `PACKAGECONFIG:remove = "foo"`, but since this happens > > > > before > > > > weak assignment, the result is an empty string instead of just > > > > the > > > > value "bar". > > > > > > Checking the master branch, and I get a different result. > > > > Indeed. With this in local.conf, or split across a recipe/bbappend: > > > > FOOBAR ??= "foo bar" > > FOOBAR:remove = “foo" > > > > $ bitbake-getvar FOOBAR > > # > > # $FOOBAR [2 operations] > > # set /yocto/ross/build/conf/local.conf:495 > > # [_defaultval] "foo bar" > > # :remove /yocto/ross/build/conf/local.conf:496 > > # "foo" > > # pre-expansion value: > > # "foo bar" > > FOOBAR=" bar” > > > > $ bitbake-getvar FOOBAR -r psplash > > # > > # $FOOBAR [2 operations] > > # set /home/ross/Yocto/poky/meta/recipes- > > core/psplash/psplash_git.bb:133 > > # [_defaultval] "foo bar" > > # :remove /home/ross/Yocto/poky/meta-poky/recipes- > > core/psplash/psplash_git.bbappend:3 > > # "foo" > > # pre-expansion value: > > # "foo bar" > > FOOBAR=" bar” > > > > Josh: can you provide a minimal reproducer, or did this quietly > > change behaviour at some point? > > When I read this discussion a few days ago, I also wondered. For > example, we have systemd on kirkstone which does: > > PACKAGECONFIG ??= " \ > ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi... > ... > " > > and in the distro there is for example: > > PACKAGECONFIG:append:pn-systemd = " cgroupv2" > PACKAGECONFIG:remove:pn-systemd = "sysvinit" > > The append and the remove operators do not reset the PACKAGECONFIG to > "". > > I see that e.g. += can be misleading. But append and remove seam to > work as expected (by me) on kirkstone.
Yes, You and Ross are correct. For some reason, I was mentally hung up on PACKAGECONFIG:pn-systemd:remove being the correct way to do this, which is very obviously wrong after you think about it. AFAICT, there is no reason to make any changes, and I sincerely apologize for wasting everyone's time and sanity on this e-mail chain. Joshua Watt > > Adrian > > > > > Ross > > > > > > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1899): https://lists.openembedded.org/g/openembedded-architecture/message/1899 Mute This Topic: https://lists.openembedded.org/mt/103269425/21656 Group Owner: openembedded-architecture+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-