[OE-core] [PATCH] recipetool: create: allow handers to set license

Mark D Horn mark.d.horn at intel.com
Wed Aug 2 23:09:45 UTC 2017


Recipetool plugins set through register_recipe_handlers were not able
to impact the license type via setting extravalues['LICENSE']. This is
due to caching the license variables in create_recipe before the handlers
have been executed.

This change moves the call to handle_license_vars well after the
registered plugins (and extravalue functions) have been called.

Signed-off-by: Mark D Horn <mark.d.horn at intel.com>
---
 scripts/lib/recipetool/create.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 359eb9adfc26..6dd1a81369bb 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -549,8 +549,6 @@ def create_recipe(args):
     lines_before.append('')
 
     handled = []
-    licvalues = handle_license_vars(srctree_use, lines_before, handled, extravalues, tinfoil.config_data)
-
     classes = []
 
     # FIXME This is kind of a hack, we probably ought to be using bitbake to do this
@@ -769,6 +767,8 @@ def create_recipe(args):
         outlines.append('')
     outlines.extend(lines_after)
 
+    licvalues = handle_license_vars(srctree_use, lines_before, handled, extravalues, tinfoil.config_data)
+
     if extravalues:
         if 'LICENSE' in extravalues and not licvalues:
             # Don't blow away 'CLOSED' value that comments say we set
-- 
2.7.4




More information about the Openembedded-core mailing list