From 11e5d7bc814a265d338dbb06d82e7533c2187be2 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Thu, 19 Jan 2012 13:59:15 +0000 Subject: classes/patch: avoid backtrace when patch does not apply We don't need to see a Python stack backtrace when a patch does not apply, just the error output from patch, so trap these kinds of errors and ensure that we display the message and fail the task and nothing else. Fixes [YOCTO #1143] (From OE-Core rev: ce6c80a1e68c2af0b4b5fa27582ad9c9f119e5c1) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- meta/classes/patch.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/classes/patch.bbclass') diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass index 471c32bce2..1ea4bc5e02 100644 --- a/meta/classes/patch.bbclass +++ b/meta/classes/patch.bbclass @@ -155,7 +155,10 @@ python patch_do_patch() { patchset.Import({"file":local, "strippath": parm['striplevel']}, True) except Exception as exc: bb.fatal(str(exc)) - resolver.Resolve() + try: + resolver.Resolve() + except bb.BBHandledException as e: + bb.fatal(str(e)) } patch_do_patch[vardepsexclude] = "PATCHRESOLVE" -- cgit v1.2.3-54-g00ecf