public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCHv2 1/2] lib/oe/patch: Make GitApplyTree.extractPatches() return the patches
@ 2026-02-24 23:22 Peter Kjellerstedt
  2026-02-24 23:22 ` [PATCHv2 2/2] devtool: standard: Add new patches in correct order when finishing Peter Kjellerstedt
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Kjellerstedt @ 2026-02-24 23:22 UTC (permalink / raw)
  To: openembedded-core

The list of patches will be used by _export_patches() in devtool to add
new patches in the correct order.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: New patch.

 meta/lib/oe/patch.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 246fc6221f..afc42df8a7 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -516,6 +516,7 @@ class GitApplyTree(PatchTree):
         import tempfile
         import shutil
         tempdir = tempfile.mkdtemp(prefix='oepatch')
+        patches = []
         try:
             for name, rev in startcommits.items():
                 shellcmd = ["git", "format-patch", "--no-signature", "--no-numbered", rev, "-o", tempdir]
@@ -553,11 +554,14 @@ class GitApplyTree(PatchTree):
                         outfile = notes.get(GitApplyTree.original_patch, os.path.basename(srcfile))
 
                         bb.utils.mkdirhier(os.path.join(outdir, name))
-                        with open(os.path.join(outdir, name, outfile), 'w') as of:
+                        patch = os.path.join(outdir, name, outfile)
+                        with open(patch, 'w') as of:
                             for line in patchlines:
                                 of.write(line)
+                        patches.append(patch)
         finally:
             shutil.rmtree(tempdir)
+        return patches
 
     def _need_dirty_check(self):
         fetch = bb.fetch2.Fetch([], self.d)


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

end of thread, other threads:[~2026-02-24 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 23:22 [PATCHv2 1/2] lib/oe/patch: Make GitApplyTree.extractPatches() return the patches Peter Kjellerstedt
2026-02-24 23:22 ` [PATCHv2 2/2] devtool: standard: Add new patches in correct order when finishing Peter Kjellerstedt

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