diff options
author | Julien Stephan <jstephan@baylibre.com> | 2023-10-25 17:46:55 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-27 08:28:38 +0100 |
commit | 0021e3573af3751089c45b690213f5abe4a883f8 (patch) | |
tree | f238d716e264e890d2f7124b48937fb237f3709a /scripts | |
parent | df011d7498ed9c5bb8d4ac81bc678069ab7058e5 (diff) | |
download | poky-0021e3573af3751089c45b690213f5abe4a883f8.tar.gz |
recipetool/create_buildsys_python: fix license note
License field of setup is not always standardized, so we usually use the
classifier to determine the correct license format to use in the recipe.
A warning note is added above the LICENSE field of the create recipe
in case a license is provided in setup. But when the plugin is called,
"LICENSE =" is not yet present so we can never display this note.
Replace the "LICENSE =" condition with "##LICENSE_PLACEHOLDER##"
to actually be able to display the note message
(From OE-Core rev: b7c26ca2028aa60f740464de85a11a01a531f32e)
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/recipetool/create_buildsys_python.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 92468b2254..321d0ba257 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py | |||
@@ -254,7 +254,7 @@ class PythonRecipeHandler(RecipeHandler): | |||
254 | 254 | ||
255 | if license_str: | 255 | if license_str: |
256 | for i, line in enumerate(lines_before): | 256 | for i, line in enumerate(lines_before): |
257 | if line.startswith('LICENSE = '): | 257 | if line.startswith('##LICENSE_PLACEHOLDER##'): |
258 | lines_before.insert(i, '# NOTE: License in setup.py/PKGINFO is: %s' % license_str) | 258 | lines_before.insert(i, '# NOTE: License in setup.py/PKGINFO is: %s' % license_str) |
259 | break | 259 | break |
260 | 260 | ||