Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/1] bitbake: implement BB_VERBOSE_LOGS
Date: Mon, 27 Feb 2012 16:04:17 +0000	[thread overview]
Message-ID: <1330358657.4593.24.camel@ted> (raw)
In-Reply-To: <f3c3d4bb21940b9f96a604145c76cfaef7b25943.1330351817.git.paul.eggleton@linux.intel.com>

On Mon, 2012-02-27 at 14:11 +0000, Paul Eggleton wrote:
> Enable configuring whether "set +x" is added to all shell tasks rather
> than forcing it; this is enabled by setting BB_VERBOSE_LOGS to 1.
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  bitbake/lib/bb/build.py  |    3 ++-
>  bitbake/lib/bb/cooker.py |    4 ++++
>  bitbake/lib/bb/msg.py    |    3 +++
>  3 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
> index e85d7c4..37686f8 100644
> --- a/bitbake/lib/bb/build.py
> +++ b/bitbake/lib/bb/build.py
> @@ -221,9 +221,10 @@ def exec_func_shell(function, d, runfile, cwd=None):
>  
>      with open(runfile, 'w') as script:
>          script.write('#!/bin/sh -e\n')
> +        if bb.msg.loggerVerboseLogs:
> +            script.write("set -x\n")
>          data.emit_func(function, script, d)
>  
> -        script.write("set -x\n")
>          if cwd:
>              script.write("cd %s\n" % cwd)

Looks good to me but could I suggest one small tweak - position the set
-x after data.emit_func()?

The reason being that having lines of output for each line in the run.*
file is generally painful and it makes more sense to start tracing only
when we start executing the function we care about.

Cheers,

Richard




  reply	other threads:[~2012-02-27 16:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 14:11 [PATCH 0/1] Allow set +x for shell functions to be configured Paul Eggleton
2012-02-27 14:11 ` [PATCH 1/1] bitbake: implement BB_VERBOSE_LOGS Paul Eggleton
2012-02-27 16:04   ` Richard Purdie [this message]
2012-02-28 13:29     ` Paul Eggleton
  -- strict thread matches above, loose matches on Subject: below --
2012-02-28 13:37 [PATCH 0/1] Allow set +x for shell functions to be configured v2 Paul Eggleton
2012-02-28 13:37 ` [PATCH 1/1] bitbake: implement BB_VERBOSE_LOGS Paul Eggleton
2012-02-27 14:06 [PATCH 0/1] Allow set +x for shell functions to be configured Paul Eggleton
2012-02-27 14:06 ` [PATCH 1/1] bitbake: implement BB_VERBOSE_LOGS Paul Eggleton
2012-02-27 14:08   ` Paul Eggleton

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=1330358657.4593.24.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.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