* [PATCH 0/1 V2] base.bbclass: Check BuildStarted for HOSTTOOLS
@ 2019-02-14 6:37 Robert Yang
2019-02-14 6:37 ` [PATCH 1/1 " Robert Yang
0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2019-02-14 6:37 UTC (permalink / raw)
To: openembedded-core
* V2
- Tweak the position of BuildStarted a little and fix comments as Peter
Kjellerstedt suggested.
* V1
- Initial version
// Robert
The following changes since commit 430bd28093fb743ba3bd032e11e40b4dd8e5bd1f:
linux-yocto: add baseline ARC support (2019-02-12 14:04:24 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/ht
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/ht
Robert Yang (1):
base.bbclass: Check BuildStarted for HOSTTOOLS
meta/classes/base.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1 V2] base.bbclass: Check BuildStarted for HOSTTOOLS
2019-02-14 6:37 [PATCH 0/1 V2] base.bbclass: Check BuildStarted for HOSTTOOLS Robert Yang
@ 2019-02-14 6:37 ` Robert Yang
0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2019-02-14 6:37 UTC (permalink / raw)
To: openembedded-core
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.
Fixed:
$ export BB_SERVER_TIMEOUT=-1
$ bitbake quilt-native
$ rm -fr tmp
$ bitbake quilt-native
ERROR: Error running gcc --version: /bin/sh: gcc: command not found
This error is caused by enable_uninative(), it runs twice (ConfigParsed and
BuildStarted), the error would happen when there is no ConfigParsed event
(no hosttools is created), but BuildStarted. This patch can fix the problem.
[YOCTO #13022]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/base.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f1a3c0e..8ece51f 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)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-14 6:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14 6:37 [PATCH 0/1 V2] base.bbclass: Check BuildStarted for HOSTTOOLS Robert Yang
2019-02-14 6:37 ` [PATCH 1/1 " Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox