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>
This commit is contained in:
parent
d5e2dd47db
commit
31c3078a63
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue