All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/19] devtool upgrade: rebase override-only patches as well
@ 2021-06-22 11:21 Alexander Kanavin
  2021-06-22 11:21 ` [PATCH 02/19] cmake: update 3.20.3 -> 3.20.4 Alexander Kanavin
                   ` (17 more replies)
  0 siblings, 18 replies; 21+ messages in thread
From: Alexander Kanavin @ 2021-06-22 11:21 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

There's a number of recipes (such as nettle or glib) which were upgraded
incorrectly due to rebasing only the default set of patches in main SRC_URI.
Native-only or musl-only patches were not handled, causing do_patch fails
and overall misery.

Unfortunately, this also necessitates aborting any incomplete rebases as
devtool needs to be able to return to the original branch to complete
the upgrade command.

Also, do not add devtool-patched-%version tags, as they are not used anywhere,
and it's unclear how to extend them to cover multiple override branches.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 scripts/lib/devtool/upgrade.py | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 24e3700ece..c6d98299da 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -261,21 +261,20 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
             logger.warning('By user choice, the following patches will NOT be applied to the new source tree:\n  %s' % '\n  '.join([os.path.basename(patch) for patch in patches]))
     else:
         __run('git checkout devtool-patched -b %s' % branch)
-        skiptag = False
-        try:
-            __run('git rebase %s' % rev)
-        except bb.process.ExecutionError as e:
-            skiptag = True
-            if 'conflict' in e.stdout:
-                logger.warning('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.warning('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
-        if not skiptag:
-            if uri.startswith('git://') or uri.startswith('gitsm://'):
-                suffix = 'new'
-            else:
-                suffix = newpv
-            __run('git tag -f devtool-patched-%s' % suffix)
+        (stdout, _) = __run('git branch --list devtool-override-*')
+        branches_to_rebase = [branch] + stdout.split()
+        for b in branches_to_rebase:
+            logger.info("Rebasing {} onto {}".format(b, rev))
+            __run('git checkout %s' % b)
+            try:
+                __run('git rebase %s' % rev)
+            except bb.process.ExecutionError as e:
+                if 'conflict' in e.stdout:
+                    logger.warning('Command \'%s\' failed:\n%s\n\nYou will need to resolve conflicts in order to complete the upgrade.' % (e.command, e.stdout.rstrip()))
+                    __run('git rebase --abort')
+                else:
+                    logger.warning('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
+        __run('git checkout %s' % branch)
 
     if tmpsrctree:
         if keep_temp:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-06-25 18:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 11:21 [PATCH 01/19] devtool upgrade: rebase override-only patches as well Alexander Kanavin
2021-06-22 11:21 ` [PATCH 02/19] cmake: update 3.20.3 -> 3.20.4 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 03/19] gnu-config: update to latest revision Alexander Kanavin
2021-06-22 11:21 ` [PATCH 04/19] bash: update 5.1 -> 5.1.8 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 05/19] dnf: updatee 4.7.0 -> 4.8.0 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 06/19] vulkan-samples: update to latest revision Alexander Kanavin
2021-06-22 11:21 ` [PATCH 07/19] bind: upgrade 9.16.16 -> 9.16.18 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 08/19] bluez5: upgrade 5.58 -> 5.59 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 09/19] dejagnu: upgrade 1.6.2 -> 1.6.3 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 10/19] gdbm: upgrade 1.19 -> 1.20 Alexander Kanavin
2021-06-25 16:36   ` [OE-core] " Ross Burton
2021-06-25 18:49     ` Alexander Kanavin
2021-06-22 11:21 ` [PATCH 11/19] libdnf: upgrade 0.63.0 -> 0.63.1 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 12/19] libpcre: upgrade 8.44 -> 8.45 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 13/19] libxi: upgrade 1.7.10 -> 1.7.99.2 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 14/19] mtools: upgrade 4.0.29 -> 4.0.31 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 15/19] python3-git: upgrade 3.1.17 -> 3.1.18 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 16/19] sqlite3: upgrade 3.35.5 -> 3.36.0 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 17/19] vte: upgrade 0.64.1 -> 0.64.2 Alexander Kanavin
2021-06-22 11:21 ` [PATCH 18/19] x264: upgrade to latest revision Alexander Kanavin
2021-06-22 11:21 ` [PATCH 19/19] python3: apply test skipping patch unconditionally Alexander Kanavin

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.