diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2015-04-23 15:41:04 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-01 07:43:31 +0100 |
commit | 31c3078a6374fb8fb4f6fc6a6d261b6322f17c7f (patch) | |
tree | 3a92b5d190aaee299dcf7604cf2f1c1f4e1cd71f /meta/lib | |
parent | d5e2dd47db886e728ca2a1cc9d771921c1f509d3 (diff) | |
download | poky-31c3078a6374fb8fb4f6fc6a6d261b6322f17c7f.tar.gz |
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>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/patch.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): | |||
337 | return (tmpfile, cmd) | 337 | return (tmpfile, cmd) |
338 | 338 | ||
339 | @staticmethod | 339 | @staticmethod |
340 | def extractPatches(tree, startcommit, outdir): | 340 | def extractPatches(tree, startcommit, outdir, paths=None): |
341 | import tempfile | 341 | import tempfile |
342 | import shutil | 342 | import shutil |
343 | tempdir = tempfile.mkdtemp(prefix='oepatch') | 343 | tempdir = tempfile.mkdtemp(prefix='oepatch') |
344 | try: | 344 | try: |
345 | shellcmd = ["git", "format-patch", startcommit, "-o", tempdir] | 345 | shellcmd = ["git", "format-patch", startcommit, "-o", tempdir] |
346 | if paths: | ||
347 | shellcmd.append('--') | ||
348 | shellcmd.extend(paths) | ||
346 | out = runcmd(["sh", "-c", " ".join(shellcmd)], tree) | 349 | out = runcmd(["sh", "-c", " ".join(shellcmd)], tree) |
347 | if out: | 350 | if out: |
348 | for srcfile in out.split(): | 351 | for srcfile in out.split(): |