summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/convert-overrides.py
Commit message (Collapse)AuthorAgeFilesLines
* scripts: convert-overrides: Allow command-line customizationsJoshua Watt2022-11-141-46/+57
| | | | | | | | | | | | | | Adds argument parsing to the conversion script so that the fields that the script uses to do conversions can be customized on the command line. The intention is to allows easier customization without having to fork the script, and allow automated checking on 3rd party layers via CI without false positives (From OE-Core rev: b9551f9180bf9f13fb1c480b5b7892fdc831ffcd) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: also convert comments without a leading whitespaceChen Qi2021-08-121-3/+3
| | | | | | | | | | | | | | | | | Currently lines like below are converted. e.g. # IMAGE_INSTALL_append = " A" But lines without a leading whitespace are not converted. e.g. #IMAGE_INSTALL_append = " A" We should be converting both. (From OE-Core rev: 1994e3844c1aa6b595c0c18040e4f8240fa04438) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: allow dots before override in vars_re and shortvars_reMartin Jansa2021-08-051-3/+3
| | | | | | | | | | | | e.g. VIRTUAL-RUNTIME_com.webos.service.flowmanager_armv4 weren't replaced with VIRTUAL-RUNTIME_com.webos.service.flowmanager:armv4 or when package name contains a dot like in: RDEPENDS:gstreamer1.0-meta-base:remove (From OE-Core rev: 41bff44bd26c09573eb3139bb6735e5ecfda18b7) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/image_types: Convert CONVERSION_CMD/COMPRESS_CMD to new override syntaxRichard Purdie2021-08-041-1/+1
| | | | | | | | | | For consistency, use override syntax for these variables as well since it is more consistent with the rest of the image code. We may be able to use these as proper overrides in due course. (From OE-Core rev: 52674c4b1fdf79829095031b2e342d44fb0dc181) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Convert IMAGE_TYPEDEP to use override syntaxRichard Purdie2021-08-041-1/+1
| | | | | | | | | The IMAGE_TYPEDEP variable would make more sense to match the form of the other image override variables, convert it to use the overrides format. (From OE-Core rev: 8573f6b2a7af9867da0b21936ffd2cd2a417de1d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: handle few more cases of overridesDenys Dmytriyenko2021-08-041-2/+3
| | | | | | | | | Add task-configure and few more supported values of TARGET_OS override. (From OE-Core rev: 1172f9593902f28ddd8da47de6bd51cda9a0f86a) Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides: Allow script to handle patch/diffsRichard Purdie2021-08-021-3/+7
| | | | | | | | | It is handy to be able to have the script convert a single patch file and it turns out to be straightforward to make it do this. (From OE-Core rev: 21df7acc969f47d615d1701ee71f19571de94949) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: allow specifying multiple target dirsMartin Jansa2021-07-301-13/+13
| | | | | | | (From OE-Core rev: e6aa4b1f6f4f174cba027ee096db174541815ff0) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: 0.9.1 include '(' as delimiter for shortvarsMartin Jansa2021-07-301-2/+2
| | | | | | | (From OE-Core rev: ffe91649fafa84f814e32c9979e6a2de40a1bb25) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: remove base_dep_prepend and autotools_dep_prepend ↵Martin Jansa2021-07-301-6/+0
| | | | | | | | | | | | exception * the functions were renamed in: https://git.openembedded.org/openembedded-core/commit/?id=9d002acae720b0a8e96a6734424a142b86880461 (From OE-Core rev: 43b7cbfb46701a130c248842426370372c88553b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* convert-overrides.py: show processed file and version of this scriptMartin Jansa2021-07-301-0/+4
| | | | | | | | | | | * on bigger layer this script takes couple minutes without showing any progress * add a version to reference it in the conversion commit (to easily figure out if it's worth re-converting the layer). (From OE-Core rev: 39edf868deafe79ffd2ea57620af70840ec4c208) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/contrib: Add override conversion scriptRichard Purdie2021-07-301-0/+141
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. For other layers it would need updating for override names and exclusions for functions/variable names with "append", "prepend" or "remove" in them. (From OE-Core rev: e8fc67f6f6baf54ccdf548b947c35dea926842c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>