wic: deferred call of hlp.get_wic_plugins_help()

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.

(From OE-Core rev: d401a8518fb4b0e8adeb34be8948fa780299870c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh 2015-08-20 14:10:29 +03:00 committed by Richard Purdie
parent 31324ed0ea
commit 8313ceae26
2 changed files with 3 additions and 1 deletions

View 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)

View File

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