Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 01/10] devtool: process local files only for the main branch
@ 2022-12-29 16:01 Alexander Kanavin
  2022-12-29 16:01 ` [PATCH 02/10] conf/machine/include: add x86-64-v3 tunes (AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE) Alexander Kanavin
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Alexander Kanavin @ 2022-12-29 16:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

devtool modify/upgrade are not currently equipped to handle conditional local files
in SRC_URI, and provide only the main no-override set in a workspace under
source/component/oe-local-files/ (this is done via meta/classes/devtool-source.bbclass).

On the other hand, updating the changes from workspace into a recipe
is run iteratively against all overrides; this works for patches (as they
all are directed into their own override branches in the workspace
git source tree), but breaks down when trying to match local files
in a workspace against local files in overridden SRC_URI lists, resulting in
bad recipe breakage.

Implementing multiple sets of local files is significant work; let's for now
simply not touch local files in recipes except when on the no-override variant.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 scripts/lib/devtool/standard.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index f46ce34ad1..f3349f98e9 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1409,6 +1409,18 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
     updated = OrderedDict()
     added = OrderedDict()
     removed = OrderedDict()
+
+    # Get current branch and return early with empty lists
+    # if on one of the override branches
+    # (local files are provided only for the main branch and processing
+    # them against lists from recipe overrides will result in mismatches
+    # and broken modifications to recipes).
+    stdout, _ = bb.process.run('git rev-parse --abbrev-ref HEAD',
+                               cwd=srctree)
+    branchname = stdout.rstrip()
+    if branchname.startswith(override_branch_prefix):
+        return (updated, added, removed)
+
     local_files_dir = os.path.join(srctreebase, 'oe-local-files')
     git_files = _git_ls_tree(srctree)
     if 'oe-local-files' in git_files:
-- 
2.30.2



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

end of thread, other threads:[~2022-12-30 10:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-29 16:01 [PATCH 01/10] devtool: process local files only for the main branch Alexander Kanavin
2022-12-29 16:01 ` [PATCH 02/10] conf/machine/include: add x86-64-v3 tunes (AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE) Alexander Kanavin
2022-12-29 16:01 ` [PATCH 03/10] qemux86-64: build for x86-64-v3 (2013 Haswell and later) rather than Core 2 from 2006 Alexander Kanavin
2022-12-29 16:01 ` [PATCH 04/10] valgrind: disable tests that started failing after switching to x86-64-v3 target Alexander Kanavin
2022-12-29 16:01 ` [PATCH 05/10] go: update 1.19.3 -> 1.19.4 Alexander Kanavin
2022-12-29 16:01 ` [PATCH 06/10] libportal: add from meta-openembedded/meta-gnome Alexander Kanavin
2022-12-29 16:07   ` [OE-core] " Markus Volk
2022-12-30  8:33     ` Alexander Kanavin
2022-12-29 16:01 ` [PATCH 07/10] libportal: convert from gtk-doc to gi-docgen Alexander Kanavin
2022-12-29 16:01 ` [PATCH 08/10] epiphany: update 42.4 -> 43.0 Alexander Kanavin
2022-12-29 16:34   ` [OE-core] " Markus Volk
2022-12-30 10:40     ` Alexander Kanavin
2022-12-29 16:01 ` [PATCH 09/10] vulkan-samples: update to latest revision Alexander Kanavin
2022-12-29 16:01 ` [PATCH 10/10] boost-build-native: update 1.80.0 -> 1.81.0 Alexander Kanavin
2022-12-29 17:18 ` [OE-core] [PATCH 01/10] devtool: process local files only for the main branch Richard Purdie
2022-12-29 20:49   ` Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox