]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oe.patch.GitApplyTree: add paths argument to extractPatches
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 23 Apr 2015 12:41:04 +0000 (15:41 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Sep 2015 14:15:47 +0000 (15:15 +0100)
Makes it possible to define which paths are included in the patches.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
meta/lib/oe/patch.py

index 7441214006f3d9469aaa1345bc0f63b832b945fe..2bf501e9e62b18beb3f0ec10293a67892ba2a332 100644 (file)
@@ -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():