]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake: Handle BBMainException
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 28 Apr 2015 11:27:34 +0000 (14:27 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 29 Apr 2015 09:59:53 +0000 (10:59 +0100)
Some error messages were lost because BBMainException was
inherited from bb.BBHandledException. When bb.BBHandledException
is processed error messages are not printed as they suppose to
be printed before raising this exception.

Stopped to inherit BBMainException from bb.BBHandledException.
Handled BBMainException in bin/bitbake and printed error message
to the stderr.

(Bitbake rev: c8e2a40c4e9865ebef9936d23644f2602a5c90f5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/bitbake
bitbake/lib/bb/main.py

index af915075dcf18c15dba7a01b2d63c897c5aa9712..3e1ca6286c618570ad39efe8b2659bf16844efe0 100755 (executable)
@@ -33,12 +33,15 @@ except RuntimeError as exc:
     sys.exit(str(exc))
 
 from bb import cookerdata
-from bb.main import bitbake_main, BitBakeConfigParameters
+from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
 
 if __name__ == "__main__":
     try:
         ret = bitbake_main(BitBakeConfigParameters(sys.argv),
                            cookerdata.CookerConfiguration())
+    except BBMainException as err:
+        print >>sys.stderr, err
+        ret = 1
     except bb.BBHandledException:
         ret = 1
     except Exception:
index af067f737931c7b285a8de7cf46f16d40152a958..2019d5014b6539b60d77fa6e392a6b1662117352 100755 (executable)
@@ -39,7 +39,7 @@ from bb import cookerdata
 __version__ = "1.27.0"
 logger = logging.getLogger("BitBake")
 
-class BBMainException(bb.BBHandledException):
+class BBMainException(Exception):
     pass
 
 def get_ui(config):