[oe-commits] [openembedded-core] 04/16: oe/patch: print cleaner error message when patch fails to apply
git at git.openembedded.org
git at git.openembedded.org
Sat Apr 2 16:27:10 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit e0156f7c89c2a9a2f61fac89ac3afd29d65449ea
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Fri Apr 1 18:02:42 2016 +0300
oe/patch: print cleaner error message when patch fails to apply
[YOCTO #9344]
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/patch.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 6ab4427..9d36172 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -214,13 +214,17 @@ class PatchTree(PatchSet):
if not force:
shellcmd.append('--dry-run')
- output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ try:
+ output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
- if force:
- return
+ if force:
+ return
- shellcmd.pop(len(shellcmd) - 1)
- output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ shellcmd.pop(len(shellcmd) - 1)
+ output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ except CmdError as err:
+ raise bb.BBHandledException("Applying '%s' failed:\n%s" %
+ (os.path.basename(patch['file']), err.output))
if not reverse:
self._appendPatchFile(patch['file'], patch['strippath'])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list