aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/main.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-06-23 22:59:10 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-05 13:38:16 +0100
commitdb95cdef08e339dec7462bfde3ad7d75c1c60dd8 (patch)
tree5b3fe5328e35c6d97fbe6e15a8e8a1a18a98de6d /lib/bb/main.py
parentde682015a3fefeff36ddc4197641a700f3fb558d (diff)
downloadbitbake-contrib-db95cdef08e339dec7462bfde3ad7d75c1c60dd8.tar.gz
knotty: add quiet output mode
Quiet output mode disables printing most messages (below warnings) to the console; however these messages still go to the console log file. This is primarily for cases where bitbake is being launched interactively from some other process, but where full console output is not needed. Because of the need to keep logging all normal events to the console log, this functionality was implemented within the knotty UI rather than in bb.msg (where verbose mode is implemented). We don't currently have a means of registering command line options from the UI end, thus the option actually has to be registered in main.py regardless of the UI, however I didn't feel like it was worth setting up such a mechanism just for this option. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/main.py')
-rwxr-xr-xlib/bb/main.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 283f29bb1..3fc3ff51e 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -179,6 +179,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("-D", "--debug", action="count", dest="debug", default=0,
help="Increase the debug level. You can specify this more than once.")
+ parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False,
+ help="Output less log message data to the terminal.")
+
parser.add_option("-n", "--dry-run", action="store_true", dest="dry_run", default=False,
help="Don't execute, just go through the motions.")
@@ -279,6 +282,12 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
options, targets = parser.parse_args(argv)
+ if options.quiet and options.verbose:
+ parser.error("options --quiet and --verbose are mutually exclusive")
+
+ if options.quiet and options.debug:
+ parser.error("options --quiet and --debug are mutually exclusive")
+
# use configuration files from environment variables
if "BBPRECONF" in os.environ:
options.prefile.append(os.environ["BBPRECONF"])