All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/1] bitbake: implement BB_VERBOSE_LOGS
Date: Mon, 27 Feb 2012 14:08:33 +0000	[thread overview]
Message-ID: <6969393.EIjsJuEBEq@helios> (raw)
In-Reply-To: <fe2f1bcd135d8079b884c006daec70c4d282bc65.1330351287.git.paul.eggleton@linux.intel.com>

On Monday 27 February 2012 14:06:18 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    |    5 ++++-
>  3 files changed, 10 insertions(+), 2 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)
>          script.write("%s\n" % function)
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 12b526b..d3bdd17 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -206,6 +206,10 @@ class BBCooker:
> 
>      def parseConfiguration(self):
> 
> +        # Set log file verbosity
> +        verboselogs =
> bb.utils.to_boolean(self.configuration.data.getVar("BB_VERBOSE_LOGS", "0"))
> +        if verboselogs:
> +            bb.msg.loggerVerboseLogs = True
> 
>          # Change nice level if we're asked to
>          nice = self.configuration.data.getVar("BB_NICE_LEVEL", True)
> diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
> index 20d9bdd..94865ee 100644
> --- a/bitbake/lib/bb/msg.py
> +++ b/bitbake/lib/bb/msg.py
> @@ -100,14 +100,17 @@ class BBLogFilter(object):
> 
>  loggerDefaultDebugLevel = 0
>  loggerDefaultVerbose = False
> +loggerVerboseLogs = False
>  loggerDefaultDomains = []
> 
> -def init_msgconfig(verbose, debug, debug_domains = []):
> +def init_msgconfig(verbose, debug, debug_domains = [], verboselogsonly =
> False): """

Whoops, this crept in from an earlier version. v2 on the way.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



  reply	other threads:[~2012-02-27 14:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
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
2012-02-28 13:29     ` Paul Eggleton
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

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=6969393.EIjsJuEBEq@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=bitbake-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.