All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jose Quaresma" <quaresma.jose@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Jose Quaresma <quaresma.jose@gmail.com>
Subject: [PATCH v2] patch.bbclass: check if patchdir exist before appling the patch
Date: Thu, 19 Aug 2021 08:53:26 +0100	[thread overview]
Message-ID: <20210819075326.8611-1-quaresma.jose@gmail.com> (raw)

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.

Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
 meta/classes/patch.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 559c6f45bd..4b38be7e3f 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -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


                 reply	other threads:[~2021-08-19  7:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210819075326.8611-1-quaresma.jose@gmail.com \
    --to=quaresma.jose@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.