]> code.ossystems Code Review - openembedded-core.git/commitdiff
Ensure we always utilize the correct messaging domains
authorChris Larson <chris_larson@mentor.com>
Fri, 9 Apr 2010 19:33:29 +0000 (12:33 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 2 Jul 2010 14:41:31 +0000 (15:41 +0100)
(Bitbake rev: 92a2e2e90981c0615171abe03645a772d84f6986)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cache.py
bitbake/lib/bb/cooker.py
bitbake/lib/bb/fetch/perforce.py
bitbake/lib/bb/parse/parse_py/ConfHandler.py
bitbake/lib/bb/runqueue.py
bitbake/lib/bb/utils.py

index 30857864dc7a56d109f2e0f1c6488b72ef625ec9..106621911b3aee5776252dbe2721e0f2db66ade1 100644 (file)
@@ -353,7 +353,7 @@ class Cache:
         pe       = self.getVar('PE', file_name, True) or "0"
         pv       = self.getVar('PV', file_name, True)
         if 'SRCREVINACTION' in pv:
-            bb.note("Found SRCREVINACTION in PV (%s) or %s. Please report this bug." % (pv, file_name))
+            bb.msg.note(1, bb.msg.domain.Cache, "Found SRCREVINACTION in PV (%s) or %s. Please report this bug." % (pv, file_name))
         pr       = self.getVar('PR', file_name, True)
         dp       = int(self.getVar('DEFAULT_PREFERENCE', file_name, True) or "0")
         depends   = bb.utils.explode_deps(self.getVar("DEPENDS", file_name, True) or "")
index f49e76d04a34925960d7116de156a8f3f73b4118..a413c8a8542d55c59ae1d1212ae33e0e78d58c40 100644 (file)
@@ -121,11 +121,11 @@ class BBCooker:
             self.commandlineAction = None
 
             if 'world' in self.configuration.pkgs_to_build:
-                bb.error("'world' is not a valid target for --environment.")
+                bb.msg.error(bb.msg.domain.Build, "'world' is not a valid target for --environment.")
             elif len(self.configuration.pkgs_to_build) > 1:
-                bb.error("Only one target can be used with the --environment option.")
+                bb.msg.error(bb.msg.domain.Build, "Only one target can be used with the --environment option.")
             elif self.configuration.buildfile and len(self.configuration.pkgs_to_build) > 0:
-                bb.error("No target should be used with the --environment and --buildfile options.")
+                bb.msg.error(bb.msg.domain.Build, "No target should be used with the --environment and --buildfile options.")
             elif len(self.configuration.pkgs_to_build) > 0:
                 self.commandlineAction = ["showEnvironmentTarget", self.configuration.pkgs_to_build]
             else:
@@ -146,13 +146,13 @@ class BBCooker:
                 self.commandlineAction = ["generateDotGraph", self.configuration.pkgs_to_build, self.configuration.cmd]
             else:
                 self.commandlineAction = None
-                bb.error("Please specify a package name for dependency graph generation.")
+                bb.msg.error(bb.msg.domain.Build, "Please specify a package name for dependency graph generation.")
         else:
             if self.configuration.pkgs_to_build:
                 self.commandlineAction = ["buildTargets", self.configuration.pkgs_to_build, self.configuration.cmd]
             else:
                 self.commandlineAction = None
-                bb.error("Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
+                bb.msg.error(bb.msg.domain.Build, "Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
 
     def runCommands(self, server, data, abort):
         """
index e2c3421089014965a6d5d3ae10f617fe7286cd8f..8bc3205c2a6d25454303541cbb3e695caf216f28 100644 (file)
@@ -160,7 +160,7 @@ class Perforce(Fetch):
         tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false")
         tmpfile = tmppipe.readline().strip()
         if not tmpfile:
-            bb.error("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.")
+            bb.msg.error(bb.msg.domain.Fetcher, "Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.")
             raise FetchError(module)
 
         if "label" in parm:
@@ -175,7 +175,7 @@ class Perforce(Fetch):
         p4file = os.popen("%s%s files %s" % (p4cmd, p4opt, depot))
 
         if not p4file:
-            bb.error("Fetch: unable to get the P4 files from %s" % (depot))
+            bb.msg.error(bb.msg.domain.Fetcher, "Fetch: unable to get the P4 files from %s" % (depot))
             raise FetchError(module)
 
         count = 0
@@ -193,7 +193,7 @@ class Perforce(Fetch):
             count = count + 1
             
         if count == 0:
-            bb.error("Fetch:  No files gathered from the P4 fetch")
+            bb.msg.error(bb.msg.domain.Fetcher, "Fetch:  No files gathered from the P4 fetch")
             raise FetchError(module)
 
         myret = os.system("tar -czf %s %s" % (ud.localpath, module))
index f4f85de245efe2e6f3d34aba9b9194c069d87b7d..6baf94554c419e501ead9d64a94dfc7bba9a8b2e 100644 (file)
@@ -39,7 +39,7 @@ def init(data):
         topdir = os.getcwd()
         bb.data.setVar('TOPDIR', topdir, data)
     if not bb.data.getVar('BBPATH', data):
-        bb.fatal("The BBPATH environment variable must be set")
+        bb.msg.fatal(bb.msg.domain.Parsing, "The BBPATH environment variable must be set")
 
 
 def supports(fn, d):
index c5f4380c8615419f8c2d1d76b6c6f7314cfbf6d4..9a368b8622d39505a89a6c1e561f05713e6cc0c9 100644 (file)
@@ -774,7 +774,7 @@ class RunQueue:
         #print "Not current: %s" % notcurrent
 
         if len(unchecked) > 0:
-            bb.fatal("check_stamps fatal internal error")
+            bb.msg.fatal(bb.msg.domain.RunQueue, "check_stamps fatal internal error")
         return current
 
     def check_stamp_task(self, task):
index dce80b6342ad09d94891176faaed81d8065eefa7..83304e4a01fe6046524f3eb247257e0f0e5716f0 100644 (file)
@@ -536,7 +536,7 @@ def filter_environment(good_vars):
         del os.environ[key]
 
     if len(removed_vars):
-        bb.debug(1, "Removed the following variables from the environment:", ",".join(removed_vars))
+        bb.msg.debug(1, bb.msg.domain.Util, "Removed the following variables from the environment:", ",".join(removed_vars))
 
     return removed_vars
 
@@ -602,10 +602,10 @@ def mkdirhier(dir):
     directory already exists like os.makedirs
     """
 
-    bb.debug(3, "mkdirhier(%s)" % dir)
+    bb.msg.debug(3, bb.msg.domain.Util, "mkdirhier(%s)" % dir)
     try:
         os.makedirs(dir)
-        bb.debug(2, "created " + dir)
+        bb.msg.debug(2, bb.msg.domain.Util, "created " + dir)
     except OSError, e:
         if e.errno != 17: raise e