openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Yocto override syntax change.
@ 2021-08-06 14:19 Patrick Williams
  2021-08-08  1:02 ` Patrick Williams
  2021-08-12 12:41 ` Patrick Williams
  0 siblings, 2 replies; 6+ messages in thread
From: Patrick Williams @ 2021-08-06 14:19 UTC (permalink / raw)
  To: OpenBMC List

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

Hello,

TL;DR: There is a required change to all meta-layers by Wednesday August 11,
2021 at 1PM UTC.  Any meta-layer not changed by that time may no longer compile.



There is a major change to the upstream Yocto syntax that requires use to do a
modification to the majority of our recipes and Yocto config files.  We will not
be able to perform another Yocto upgrade until this work is complete on our
part.

Yocto has an override syntax that is often used for machine and distro-specific
variable modification.  The previous syntax was something like:

    PACKAGECONFIG_append_machine = " pkgfeature"

This is being changed so that colons are used as override separators instead of
underscores:

    PACKAGECONFIG:append:machine = " pkgfeature"

In the current bitbake we have in master there is support for both syntaxes,
because the code simply does a `s/:/_/` in variable processing, but the next
bitbake/Yocto pull will remove support for the underscore syntax and all usage
of it will be broken.  Again, until we make this change, we cannot pick up
Yocto updates because our current override syntax usage is no longer supported.

Upstream has provided a script to help facilitate this transition but I am
finding that it does not catch every case and some additional help is needed.

---- Fix-up procedure and tips ----

The helper script is in the `poky` repository at:
    scripts/contrib/convert-overrides.py

This can be obtained either by cloning or downloading directly:
    $ git clone git://git.yoctoproject.org/poky
    $ wget https://git.yoctoproject.org/cgit/cgit.cgi/poky/plain/scripts/contrib/convert-overrides.py

You may then run this on your meta-layer:
    $ path/to/convert-overrides.py meta-evb

After this, to find potential misses run the following grep:
    $ git grep "_[a-z0-9_/-]*[ :]" -- meta-evb

In the meta-evb tree I observed a number of _evb-* and _u-boot* variables were
missed.  I fixed them like this:
    $ git grep -l _evb -- meta-evb | xargs sed -i 's/_evb/:evb/'
    $ git grep -l _u-boot -- meta-evb | xargs sed -i 's/_u-boot/:u-boot/'

(There were a few other variables fixed up, but hopefully you get the pattern
 after two.)
-----------------------------------

After this you will want to do a build of your machine(s).  I would also
recommend spot checking a few recipes with `bitbake <recipe> -ne` to ensure the
overrides are applied as you expect.



I will be making changes to meta-evb, meta-aspeed, meta-phosphor, and
meta-facebook shortly under the gerrit topic "override-syntax".  Hopefully this
gives a sufficient pattern for others to mimic over the next few days.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-10-13  2:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 14:19 Yocto override syntax change Patrick Williams
2021-08-08  1:02 ` Patrick Williams
2021-08-10 22:23   ` Patrick Williams
2021-08-12 12:41 ` Patrick Williams
2021-08-13  3:19   ` [External] " Lei Yu
2021-10-13  2:58   ` Patrick Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).