summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-09 15:55:17 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:31 +0100
commit146046bcda4e481cb221de59ac9858303d473fec (patch)
treefc471111f2e87d734edb908def74f1ba982824b7 /bitbake/lib
parent21a9692c7daf1498f862f5dbe1b85201df39baa7 (diff)
downloadpoky-146046bcda4e481cb221de59ac9858303d473fec.tar.gz
Immediately display messages if no UI handlers are installed yet
(Bitbake rev: 17c414d0c050c42d4beb3f1dd84573020aacb392) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/msg.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index 3fcf7091be..9cb1d4c143 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -101,25 +101,34 @@ def debug(level, domain, msg, fn = None):
101 domain = 'default' 101 domain = 'default'
102 if debug_level[domain] >= level: 102 if debug_level[domain] >= level:
103 bb.event.fire(MsgDebug(msg), None) 103 bb.event.fire(MsgDebug(msg), None)
104 if not bb.event._ui_handlers:
105 print 'DEBUG: ' + msg
104 106
105def note(level, domain, msg, fn = None): 107def note(level, domain, msg, fn = None):
106 if not domain: 108 if not domain:
107 domain = 'default' 109 domain = 'default'
108 if level == 1 or verbose or debug_level[domain] >= 1: 110 if level == 1 or verbose or debug_level[domain] >= 1:
109 bb.event.fire(MsgNote(msg), None) 111 bb.event.fire(MsgNote(msg), None)
112 if not bb.event._ui_handlers:
113 print 'NOTE: ' + msg
110 114
111def warn(domain, msg, fn = None): 115def warn(domain, msg, fn = None):
112 bb.event.fire(MsgWarn(msg), None) 116 bb.event.fire(MsgWarn(msg), None)
117 if not bb.event._ui_handlers:
118 print 'WARNING: ' + msg
113 119
114def error(domain, msg, fn = None): 120def error(domain, msg, fn = None):
115 bb.event.fire(MsgError(msg), None) 121 bb.event.fire(MsgError(msg), None)
116 print 'ERROR: ' + msg 122 if not bb.event._ui_handlers:
123 print 'ERROR: ' + msg
117 124
118def fatal(domain, msg, fn = None): 125def fatal(domain, msg, fn = None):
119 bb.event.fire(MsgFatal(msg), None) 126 bb.event.fire(MsgFatal(msg), None)
120 print 'FATAL: ' + msg 127 if not bb.event._ui_handlers:
128 print 'FATAL: ' + msg
121 sys.exit(1) 129 sys.exit(1)
122 130
123def plain(msg, fn = None): 131def plain(msg, fn = None):
124 bb.event.fire(MsgPlain(msg), None) 132 bb.event.fire(MsgPlain(msg), None)
125 133 if not bb.event._ui_handlers:
134 print msg