Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Robert Yang <liezhi.yang@windriver.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] base.bbclass: Use bb.event.ParseStarted for	HOSTTOOLS
Date: Mon, 28 Jan 2019 11:46:28 +0000	[thread overview]
Message-ID: <345abb1ed40143339310707ff00d5aa4@XBOX04.axis.com> (raw)
In-Reply-To: <8b20fa4c993e073ec37b0fd6c309a52c4939959c.1548667130.git.liezhi.yang@windriver.com>

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-bounces@lists.openembedded.org> On Behalf Of Robert Yang
> Sent: den 28 januari 2019 10:19
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/1] base.bbclass: Use bb.event.ParseStarted
> for HOSTTOOLS
> 
> 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 is because bb.event.ParseStarted fires only once when server is running,

I assume you meant bb.event.ConfigParsed above?

> but bb.event.ParseStarted fires every time when build configs are changed, so
> use bb.event.ParseStarted to fix the problem.
> 
> [YOCTO #13022]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/classes/base.bbclass | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index f1a3c0e..c273a29 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -220,11 +220,18 @@ def buildcfg_neededvars(d):
>          bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
> 
>  addhandler base_eventhandler
> -base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete bb.event.RecipeParsed"
> +base_eventhandler[eventmask] = "\
> +	bb.event.ParseStarted \
> +	bb.event.MultiConfigParsed \
> +	bb.event.BuildStarted \
> +	bb.event.RecipePreFinalise \
> +	bb.runqueue.sceneQueueComplete \
> +	bb.event.RecipeParsed \
> +"
>  python base_eventhandler() {
>      import bb.runqueue
> 
> -    if isinstance(e, bb.event.ConfigParsed):
> +    if isinstance(e, bb.event.ParseStarted):
>          if not d.getVar("NATIVELSBSTRING", False):
>              d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
>          d.setVar('BB_VERSION', bb.__version__)
> --
> 2.7.4

//Peter



  reply	other threads:[~2019-01-28 11:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28  9:19 [PATCH 0/1] base.bbclass: Use bb.event.ParseStarted for HOSTTOOLS Robert Yang
2019-01-28  9:19 ` [PATCH 1/1] " Robert Yang
2019-01-28 11:46   ` Peter Kjellerstedt [this message]
2019-01-29  8:40     ` Robert Yang
2019-01-30  9:06   ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=345abb1ed40143339310707ff00d5aa4@XBOX04.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox