summaryrefslogtreecommitdiffstats
path: root/bitbake/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-08 09:57:27 +0100
commit76feac37ceb68a850394e51dce8e36f1ec2c895d (patch)
treebc90e81add399a0098426c3d93db92553b0e02d2 /bitbake/lib/bb/main.py
parent465f93968f113ab32efc9da151078d481a9e08b9 (diff)
downloadpoky-76feac37ceb68a850394e51dce8e36f1ec2c895d.tar.gz
bitbake: 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. (Bitbake rev: db95cdef08e339dec7462bfde3ad7d75c1c60dd8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/main.py')
-rwxr-xr-xbitbake/lib/bb/main.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 283f29bb15..3fc3ff51e2 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -179,6 +179,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
179 parser.add_option("-D", "--debug", action="count", dest="debug", default=0, 179 parser.add_option("-D", "--debug", action="count", dest="debug", default=0,
180 help="Increase the debug level. You can specify this more than once.") 180 help="Increase the debug level. You can specify this more than once.")
181 181
182 parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False,
183 help="Output less log message data to the terminal.")
184
182 parser.add_option("-n", "--dry-run", action="store_true", dest="dry_run", default=False, 185 parser.add_option("-n", "--dry-run", action="store_true", dest="dry_run", default=False,
183 help="Don't execute, just go through the motions.") 186 help="Don't execute, just go through the motions.")
184 187
@@ -279,6 +282,12 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
279 282
280 options, targets = parser.parse_args(argv) 283 options, targets = parser.parse_args(argv)
281 284
285 if options.quiet and options.verbose:
286 parser.error("options --quiet and --verbose are mutually exclusive")
287
288 if options.quiet and options.debug:
289 parser.error("options --quiet and --debug are mutually exclusive")
290
282 # use configuration files from environment variables 291 # use configuration files from environment variables
283 if "BBPRECONF" in os.environ: 292 if "BBPRECONF" in os.environ:
284 options.prefile.append(os.environ["BBPRECONF"]) 293 options.prefile.append(os.environ["BBPRECONF"])