[yocto] [PATCH 2/2] When 'devtool upgrade' fails to rebase patches, stop and report a failure
Alexander Kanavin
alexander.kanavin at linux.intel.com
Wed Mar 21 09:19:17 PDT 2018
Previously it would continue, which eventually resulted in an unhelpful, generic
error message printed by 'devtool finish'.
Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
modules/steps.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/steps.py b/modules/steps.py
index 5bbe38e..2eb4499 100644
--- a/modules/steps.py
+++ b/modules/steps.py
@@ -82,6 +82,10 @@ def devtool_upgrade(devtool, bb, git, opts, pkg_ctx):
try:
devtool_output = devtool.upgrade(pkg_ctx['PN'], pkg_ctx['NPV'], pkg_ctx['NSRCREV'])
+ D(" 'devtool upgrade' printed:\n%s" %(devtool_output))
+ # If devtool failed to rebase patches, it does not fail, but we should
+ if 'conflict' in devtool_output:
+ raise DevtoolError("Running 'devtool upgrade' for recipe %s failed." %(pkg_ctx['PN']), devtool_output)
except DevtoolError as e1:
try:
devtool_output = devtool.reset(pkg_ctx['PN'])
@@ -96,7 +100,6 @@ def devtool_upgrade(devtool, bb, git, opts, pkg_ctx):
with open(os.path.join(pkg_ctx['workdir'], pkg_ctx['license_diff_fn']), 'wb') as f:
f.write(b"".join(license_diff_info))
- D(" 'devtool upgrade' printed:\n%s" %(devtool_output))
def _compile(bb, pkg, machine, workdir):
try:
--
2.16.1
More information about the yocto
mailing list