]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
patch.bbclass: Show full path when a patch fails to apply
authorPeter Kjellerstedt <pkj@axis.com>
Wed, 7 Jan 2026 11:46:49 +0000 (12:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Jan 2026 22:46:04 +0000 (22:46 +0000)
If a patch fails to apply, it helps to know the full path to it. This is
especially true if multiple versions of the patch exists, e.g., due to
overrides via bbappends.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/patch.bbclass

index e5786b1c9ad49dd6def9c33f4cf882f2ae45d952..2d9b39c9a557d851985c1de2e827ffd4653cf583 100644 (file)
@@ -150,12 +150,12 @@ python patch_do_patch() {
             patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
         except Exception as exc:
             bb.utils.remove(process_tmpdir, True)
-            bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc).replace("\\n", "\n")))
+            bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (local, parm['striplevel'], repr(exc).replace("\\n", "\n")))
         try:
             resolver.Resolve()
         except bb.BBHandledException as e:
             bb.utils.remove(process_tmpdir, True)
-            bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e).replace("\\n", "\n")))
+            bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (local, patchdir, repr(e).replace("\\n", "\n")))
 
     bb.utils.remove(process_tmpdir, True)
     del os.environ['TMPDIR']