From: Julien Stephan Date: Wed, 25 Oct 2023 15:46:55 +0000 (+0200) Subject: recipetool/create_buildsys_python: fix license note X-Git-Tag: yocto-5.2~4760 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7c26ca2028aa60f740464de85a11a01a531f32e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Julien Stephan Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 92468b22546..321d0ba257d 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py @@ -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