mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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. (From OE-Core rev: 2a76be958432a35a0de30e9a5433089a54a06cad) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ab227452c7
commit
93a1c01666
@@ -236,16 +236,22 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
|
|||||||
for patch in patches:
|
for patch in patches:
|
||||||
logger.warn("%s" % os.path.basename(patch))
|
logger.warn("%s" % os.path.basename(patch))
|
||||||
else:
|
else:
|
||||||
|
__run('git checkout devtool-patched -b %s' % branch)
|
||||||
|
skiptag = False
|
||||||
try:
|
try:
|
||||||
__run('git checkout devtool-patched -b %s' % branch)
|
|
||||||
__run('git rebase %s' % rev)
|
__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://'):
|
if uri.startswith('git://'):
|
||||||
suffix = 'new'
|
suffix = 'new'
|
||||||
else:
|
else:
|
||||||
suffix = newpv
|
suffix = newpv
|
||||||
__run('git tag -f devtool-patched-%s' % suffix)
|
__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 tmpsrctree:
|
||||||
if keep_temp:
|
if keep_temp:
|
||||||
|
|||||||
Reference in New Issue
Block a user