mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
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:
committed by
Richard Purdie
parent
bf140145a0
commit
fc8b24d8e0
@@ -214,13 +214,17 @@ class PatchTree(PatchSet):
|
|||||||
if not force:
|
if not force:
|
||||||
shellcmd.append('--dry-run')
|
shellcmd.append('--dry-run')
|
||||||
|
|
||||||
output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
|
try:
|
||||||
|
output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
|
||||||
|
|
||||||
if force:
|
if force:
|
||||||
return
|
return
|
||||||
|
|
||||||
shellcmd.pop(len(shellcmd) - 1)
|
shellcmd.pop(len(shellcmd) - 1)
|
||||||
output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
|
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:
|
if not reverse:
|
||||||
self._appendPatchFile(patch['file'], patch['strippath'])
|
self._appendPatchFile(patch['file'], patch['strippath'])
|
||||||
|
|||||||
Reference in New Issue
Block a user