diff options
-rw-r--r-- | meta/classes/patch.bbclass | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass index 25ec089ae1..484d27ac76 100644 --- a/meta/classes/patch.bbclass +++ b/meta/classes/patch.bbclass | |||
@@ -131,6 +131,9 @@ python patch_do_patch() { | |||
131 | patchdir = parm["patchdir"] | 131 | patchdir = parm["patchdir"] |
132 | if not os.path.isabs(patchdir): | 132 | if not os.path.isabs(patchdir): |
133 | patchdir = os.path.join(s, patchdir) | 133 | patchdir = os.path.join(s, patchdir) |
134 | if not os.path.isdir(patchdir): | ||
135 | bb.fatal("Target directory '%s' not found, patchdir '%s' is incorrect in patch file '%s'" % | ||
136 | (patchdir, parm["patchdir"], parm['patchname'])) | ||
134 | else: | 137 | else: |
135 | patchdir = s | 138 | patchdir = s |
136 | 139 | ||
@@ -147,12 +150,12 @@ python patch_do_patch() { | |||
147 | patchset.Import({"file":local, "strippath": parm['striplevel']}, True) | 150 | patchset.Import({"file":local, "strippath": parm['striplevel']}, True) |
148 | except Exception as exc: | 151 | except Exception as exc: |
149 | bb.utils.remove(process_tmpdir, True) | 152 | bb.utils.remove(process_tmpdir, True) |
150 | bb.fatal(str(exc)) | 153 | bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], str(exc))) |
151 | try: | 154 | try: |
152 | resolver.Resolve() | 155 | resolver.Resolve() |
153 | except bb.BBHandledException as e: | 156 | except bb.BBHandledException as e: |
154 | bb.utils.remove(process_tmpdir, True) | 157 | bb.utils.remove(process_tmpdir, True) |
155 | bb.fatal(str(e)) | 158 | bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, str(e))) |
156 | 159 | ||
157 | bb.utils.remove(process_tmpdir, True) | 160 | bb.utils.remove(process_tmpdir, True) |
158 | del os.environ['TMPDIR'] | 161 | del os.environ['TMPDIR'] |