Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] recipetool: create: allow handers to set license
@ 2017-08-02 23:09 Mark D Horn
  2017-08-10 10:00 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Mark D Horn @ 2017-08-02 23:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mark D Horn

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@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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-17 23:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 23:09 [PATCH] recipetool: create: allow handers to set license Mark D Horn
2017-08-10 10:00 ` Richard Purdie
2017-08-17 23:35   ` Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox