]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
recipetool/create_buildsys_python: fix license note
authorJulien Stephan <jstephan@baylibre.com>
Wed, 25 Oct 2023 15:46:55 +0000 (17:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 Oct 2023 07:28:04 +0000 (08:28 +0100)
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

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>
scripts/lib/recipetool/create_buildsys_python.py

index 92468b22546405b8b1b24d39d87d030024ff99ad..321d0ba257d37621417f2efd7d8d63ea3a076ed1 100644 (file)
@@ -254,7 +254,7 @@ class PythonRecipeHandler(RecipeHandler):
 
         if license_str:
             for i, line in enumerate(lines_before):
-                if line.startswith('LICENSE = '):
+                if line.startswith('##LICENSE_PLACEHOLDER##'):
                     lines_before.insert(i, '# NOTE: License in setup.py/PKGINFO is: %s' % license_str)
                     break