summaryrefslogtreecommitdiffstats
path: root/meta/classes/patch.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-25 16:04:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-26 12:08:18 +0100
commit2ca853a01ee95b3217100edc6ba769a8bddf4f1a (patch)
tree3efb8b4f4bb1243e40a5be4c81931a7f870bd108 /meta/classes/patch.bbclass
parentc2bbcd415891d604d2429c5901881b1d0ab38d32 (diff)
downloadpoky-2ca853a01ee95b3217100edc6ba769a8bddf4f1a.tar.gz
patch: Fix exception reporting with repr()
The exceptions generated with repre are more detailed but escaped the newlines making them unreadable. Fix this. (From OE-Core rev: 26a7012e6e17e6b4b4478a25b1b2d5608fe77cfc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/patch.bbclass')
-rw-r--r--meta/classes/patch.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index fdf3c633bc..8de7025491 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -150,12 +150,12 @@ python patch_do_patch() {
150 patchset.Import({"file":local, "strippath": parm['striplevel']}, True) 150 patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
151 except Exception as exc: 151 except Exception as exc:
152 bb.utils.remove(process_tmpdir, True) 152 bb.utils.remove(process_tmpdir, True)
153 bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc))) 153 bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc).replace("\\n", "\n")))
154 try: 154 try:
155 resolver.Resolve() 155 resolver.Resolve()
156 except bb.BBHandledException as e: 156 except bb.BBHandledException as e:
157 bb.utils.remove(process_tmpdir, True) 157 bb.utils.remove(process_tmpdir, True)
158 bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e))) 158 bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e).replace("\\n", "\n")))
159 159
160 bb.utils.remove(process_tmpdir, True) 160 bb.utils.remove(process_tmpdir, True)
161 del os.environ['TMPDIR'] 161 del os.environ['TMPDIR']