diff options
-rw-r--r-- | meta/classes/base.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index f1a3c0e53e..8ece51fe42 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -228,6 +228,12 @@ python base_eventhandler() { if not d.getVar("NATIVELSBSTRING", False): d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d)) d.setVar('BB_VERSION', bb.__version__) + + # There might be no bb.event.ConfigParsed event if bitbake server is + # running, so check bb.event.BuildStarted too to make sure ${HOSTTOOLS_DIR} + # exists. + if isinstance(e, bb.event.ConfigParsed) or \ + (isinstance(e, bb.event.BuildStarted) and not os.path.exists(d.getVar('HOSTTOOLS_DIR'))): # Works with the line in layer.conf which changes PATH to point here setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS', d) setup_hosttools_dir(d.getVar('HOSTTOOLS_DIR'), 'HOSTTOOLS_NONFATAL', d, fatal=False) |