Skip to contentSkip to conversation

scripts/contrib: Add override conversion script

PATCH Richard Purdie 2 participants 4 messages Jul 29, 2021 – Jul 31, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 10 lines · Richard Purdie via lists.openembedded.org

This adds a script I've developed to migrate metadata to use the new override syntax. It is a bit rough but since its for a single use with validation, it doesn't need to be perfect. It is run simply as:

scripts/contrib/convert-overrides.py <directory>

It is setup and has been tested to work with OE-Core, Bitbake, yocto-docs, meta-yocto, meta-gplv2 and meta-mingw. For OE-Core, it converts around 10,100 lines with about 34 manual fixes needed.

Quoted 8 lines

For other layers it would need updating for override names and exclusions for functions/variable names with "append", "prepend" or "remove" in them.

---
 scripts/contrib/convert-overrides.py | 146 +++++++++++++++++++++++++++

 1 file changed, 146 insertions(+)

 create mode 100755 scripts/contrib/convert-overrides.py

Since people are starting to use this, it is easier if it is in OE-Core and we can then make changes as normal to it with patches.

I've therefore merged an updated version which has taken some of the review feedback on board and improved it, along with feedback from some real world use.

Cheers,

Richard

#2 lore raw

Hi,

Not sure this is the right list and mail I am replying to ;)

I was wondering what's happening with backwards compatibility.

It looks like it will not be possible to have a layer with new syntax fixes which will also work for some older versions (hardknott and older).

Regards,

Robert

Quoted 3 lines
#3 lore raw
Quoted 6 lines · Robert Berger

Not sure this is the right list and mail I am replying to ;)

I was wondering what's happening with backwards compatibility.

It looks like it will not be possible to have a layer with new syntax fixes which will also work for some older versions (hardknott and older).

That isn't correct. There are patches backported to the bitbake 1.50, 1.48 and 1.46 branches which mean the older bitbake will accept the new syntax.

This means that converted layers will work with older releases, as long as someone has updated to the new version of bitbake for that stable series (and the later worked with that release in the first place!).

Cheers,

Richard

#4 lore raw

Hi Richard,

Quoted 7 lines · Richard Purdie

That isn't correct. There are patches backported to the bitbake 1.50, 1.48 and 1.46 branches which mean the older bitbake will accept the new syntax.

This means that converted layers will work with older releases, as long as someone has updated to the new version of bitbake for that stable series (and the later worked with that release in the first place!).

Makes sense. Thanks for the clarification.

Quoted 5 lines

Cheers,

Richard

Regards,

Robert