]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: deferred call of hlp.get_wic_plugins_help()
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 20 Aug 2015 11:10:29 +0000 (14:10 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 11:34:35 +0000 (12:34 +0100)
If get_wic_plugins_help is called from wic main module
it calls git_bitbake_var at some point. This fails when
wic is called from bitbake as 'bitbake -e' can't be
run.

Moved call of this method to help.py in order to call it
later, when BitbakeVariables singleton is properly initialized
to get variables from .env files.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/image/help.py
scripts/wic

index dc6ff36610d4036ef5bdaef0171b824cf5034668..717d84755fdae2169fe07a4202a67fa3fa445187 100644 (file)
@@ -42,6 +42,8 @@ def display_help(subcommand, subcommands):
         return False
 
     hlp = subcommands.get(subcommand, subcommand_error)[2]
+    if callable(hlp):
+        hlp = hlp()
     pager = subprocess.Popen('less', stdin=subprocess.PIPE)
     pager.communicate(hlp)
 
index c1d3003378bef1af10556d65764a8af6d4f78e74..5aa2393cf968760d5d0f199cd17fe53691ec1987 100755 (executable)
@@ -280,7 +280,7 @@ subcommands = {
                   hlp.wic_list_help],
     "plugins":   [wic_help_topic_subcommand,
                   wic_help_topic_usage,
-                  hlp.get_wic_plugins_help()],
+                  hlp.get_wic_plugins_help],
     "overview":  [wic_help_topic_subcommand,
                   wic_help_topic_usage,
                   hlp.wic_overview_help],