oe/patch: print cleaner error message when patch fails to apply
[YOCTO #9344] (From OE-Core rev: 574405a97f956278d31d52cfc934be2840cf2fa6) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
bf140145a0
commit
fc8b24d8e0
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue