浏览代码

oe.patch.GitApplyTree: add paths argument to extractPatches

Makes it possible to define which paths are included in the patches.

(From OE-Core rev: 640e57b423e5a8f0e4572eac985f87139780f247)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Markus Lehtonen 10 年之前
父节点
当前提交
31c3078a63
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      meta/lib/oe/patch.py

+ 4 - 1
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():