From: Peter Kjellerstedt Date: Tue, 24 Feb 2026 23:22:35 +0000 (+0100) Subject: lib/oe/patch: Make GitApplyTree.extractPatches() return the patches X-Git-Tag: uninative-5.1~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e40c8ed2a8f70140b2304a76fe6ea52e36c0db18;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git lib/oe/patch: Make GitApplyTree.extractPatches() return the patches 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 Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- 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)