aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-05-09 11:30:58 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-05-24 16:17:26 +1200
commit47264e626abd0db3dcd724c89f34f76e75f04436 (patch)
tree35e9297c093ab594e819d3339298872c0dc839ba
parent82db35e40ef7d801b96dc5ac0171085b9135b4a1 (diff)
downloadopenembedded-core-contrib-47264e626abd0db3dcd724c89f34f76e75f04436.tar.gz
devtool: upgrade: tweak conflict handling
Make a couple of changes to the rebase operation: 1) Only wrap the actual rebase command in try...except since a failure in any of the other commands should be an error, not a warning 2) If it's a conflict (which unfortunately we can only tell by checking for the keyword "conflict" since git doesn't return error codes based on the type of error) then print a message clarifying that the user needs to resolve the issue themselves to finish the upgrade. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--scripts/lib/devtool/upgrade.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index e34234a34f..7e6aa4278a 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -236,16 +236,22 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
for patch in patches:
logger.warn("%s" % os.path.basename(patch))
else:
+ __run('git checkout devtool-patched -b %s' % branch)
+ skiptag = False
try:
- __run('git checkout devtool-patched -b %s' % branch)
__run('git rebase %s' % rev)
+ except bb.process.ExecutionError as e:
+ skiptag = True
+ if 'conflict' in e.stdout:
+ logger.warn('Command \'%s\' failed:\n%s\n\nYou will need to resolve conflicts in order to complete the upgrade.' % (e.command, e.stdout.rstrip()))
+ else:
+ logger.warn('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
+ if not skiptag:
if uri.startswith('git://'):
suffix = 'new'
else:
suffix = newpv
__run('git tag -f devtool-patched-%s' % suffix)
- except bb.process.ExecutionError as e:
- logger.warn('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
if tmpsrctree:
if keep_temp: