Skip to contentSkip to conversation

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

PATCH Jose Quaresma 1 participant 1 message Aug 19, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

It only makes sense to check if the patchdir exists when it is defined, fixed in V3

Jose Quaresma via lists.openembedded.org <[email protected]> escreveu no dia quinta, 19/08/2021 à(s) 08:53:

Quoted 29 lines

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 -1
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)
--

2.33.0

Signature · 3 lines
Best regards,

José Quaresma