Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Peter Seebach <peter.seebach@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] sanity.bbclass: Don't fatal() when trying to dump environment.
Date: Wed, 20 Nov 2013 10:19:04 +0000	[thread overview]
Message-ID: <1384942744.16887.40.camel@ted> (raw)
In-Reply-To: <16a4c667fd7dde1f7d503942c45e03a6bda98ae8.1384907111.git.peter.seebach@windriver.com>

On Tue, 2013-11-19 at 18:31 -0600, Peter Seebach wrote:
> It is distressing when bitbake -e can't run due to sanity check
> failures, because the solution often involves figuring out what
> configuration file are being read and what values they are setting.
> Solution: Don't do that. If the datasmart object reports that
> tracking is enabled, emit an error() but not a fatal(), and also
> warn the user that things may be badly broken.
> 
> This depends on a change to bitbake (adding the isTracking() method).
> 
> Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
> ---
>  meta/classes/sanity.bbclass |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 6807a23..1ef811d 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -82,11 +82,17 @@ def raise_sanity_error(msg, d, network_error=False):
>              bb.event.fire(bb.event.SanityCheckFailed(msg), d)
>          return
>  
> -    bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration.
> +    msg = (""" OE-core's config sanity checker detected a potential misconfiguration.
>      Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
>      Following is the list of potential problems / advisories:
>      
>      %s""" % msg)
> +    if d.isTracking():
> +	bb.warn("Environment tracking enabled: NOT exiting on sanity check failures.")
> +	bb.warn("Results may be inconsistent or meaningless; proceed at your own risk.")
> +        bb.error(msg)
> +    else:
> +        bb.fatal(msg)

This is creative but you just disabled the sanity tests in the graphical
UIs like hob.

isTracking() does not mean -e is being used, we use the tracking in
other places now too.

Cheers,

Richard



  parent reply	other threads:[~2013-11-20 10:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  0:31 [PATCH 0/1] Make sanity check failures nonfatal for bitbake -e Peter Seebach
2013-11-20  0:31 ` [PATCH 1/1] sanity.bbclass: Don't fatal() when trying to dump environment Peter Seebach
2013-11-20  0:35   ` Martin Jansa
2013-11-20  0:42     ` Peter Seebach
2013-11-20 10:19   ` Richard Purdie [this message]
2013-11-20 15:16     ` Peter Seebach

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=1384942744.16887.40.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.seebach@windriver.com \
    /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