All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: yocto@yoctoproject.org
Subject: [PATCH 2/2] When 'devtool upgrade' fails to rebase patches, stop and report a failure
Date: Wed, 21 Mar 2018 18:19:17 +0200	[thread overview]
Message-ID: <20180321161917.13028-2-alexander.kanavin@linux.intel.com> (raw)
In-Reply-To: <20180321161917.13028-1-alexander.kanavin@linux.intel.com>

Previously it would continue, which eventually resulted in an unhelpful, generic
error message printed by 'devtool finish'.

Signed-off-by: Alexander Kanavin <alexander.kanavin@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



  reply	other threads:[~2018-03-21 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 16:19 [PATCH 1/2] Do not skip packages that were attempted recently Alexander Kanavin
2018-03-21 16:19 ` Alexander Kanavin [this message]
2018-03-21 16:20 ` Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180321161917.13028-2-alexander.kanavin@linux.intel.com \
    --to=alexander.kanavin@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.