public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <pkj@axis.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCHv2 1/2] lib/oe/patch: Make GitApplyTree.extractPatches() return the patches
Date: Wed, 25 Feb 2026 00:22:35 +0100	[thread overview]
Message-ID: <20260224232236.2048910-1-pkj@axis.com> (raw)

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)


             reply	other threads:[~2026-02-24 23:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 23:22 Peter Kjellerstedt [this message]
2026-02-24 23:22 ` [PATCHv2 2/2] devtool: standard: Add new patches in correct order when finishing Peter Kjellerstedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260224232236.2048910-1-pkj@axis.com \
    --to=pkj@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox