Skip to contentSkip to conversation

patch.bbclass: check if patchdir exist before appling the patch

PATCH Superseded Jose Quaresma 1 participant 1 message Aug 19, 2021

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 patch.bbclass: check if patchdir exist before appling the patch

if the user specifies a relative path on 'patchdir' that don't exist, the patch will fail and there are no message that indicates the real cause.

---
 meta/classes/patch.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/patch.bbclass +3 -0
index 559c6f45bd..4b38be7e3f 100644
@@ -134,6 +134,9 @@ python patch_do_patch() {
         else:
             patchdir = s
 
+        if not os.path.isdir(patchdir):
+            bb.fatal("Patch source directory don't found '%s'" % patchdir)
+
         if not patchdir in classes:
             patchset = cls(patchdir, d)
             resolver = rcls(patchset, oe_terminal)
Signature · 1 line
2.33.0