1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

devtool: commit for extra tasks that modify source when extracting

When extracting source for a recipe, if there are additional custom
tasks run that make changes to the source, create a commit in the
generated git branch so they are contained. This is particularly
useful for tasks that come before do_patch since otherwise the changes
might get incorporated in the first applied patch, but otherwise it
helps avoid the tree being dirty at any point.

Fixes [YOCTO #7626].

(From OE-Core rev: 997a77d9b20af1778b804778e5d8c8a7424f7582)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2016-02-11 14:13:28 +13:00
committed by Richard Purdie
parent e36cb6c718
commit ddfe74447b
2 changed files with 38 additions and 13 deletions
+3
View File
@@ -264,6 +264,7 @@ class PatchTree(PatchSet):
class GitApplyTree(PatchTree):
patch_line_prefix = '%% original patch'
ignore_commit_prefix = '%% ignore'
def __init__(self, dir, d):
PatchTree.__init__(self, dir, d)
@@ -384,6 +385,8 @@ class GitApplyTree(PatchTree):
if line.startswith(GitApplyTree.patch_line_prefix):
outfile = line.split()[-1].strip()
continue
if line.startswith(GitApplyTree.ignore_commit_prefix):
continue
patchlines.append(line)
if not outfile:
outfile = os.path.basename(srcfile)