From 640e57b423e5a8f0e4572eac985f87139780f247 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 23 Apr 2015 15:41:04 +0300 Subject: oe.patch.GitApplyTree: add paths argument to extractPatches Makes it possible to define which paths are included in the patches. Signed-off-by: Markus Lehtonen --- meta/lib/oe/patch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/lib/oe/patch.py') diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 7441214006..2bf501e9e6 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -337,12 +337,15 @@ class GitApplyTree(PatchTree): return (tmpfile, cmd) @staticmethod - def extractPatches(tree, startcommit, outdir): + def extractPatches(tree, startcommit, outdir, paths=None): import tempfile import shutil tempdir = tempfile.mkdtemp(prefix='oepatch') try: shellcmd = ["git", "format-patch", startcommit, "-o", tempdir] + if paths: + shellcmd.append('--') + shellcmd.extend(paths) out = runcmd(["sh", "-c", " ".join(shellcmd)], tree) if out: for srcfile in out.split(): -- cgit 1.2.3-korg