From 997a77d9b20af1778b804778e5d8c8a7424f7582 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Thu, 11 Feb 2016 14:13:28 +1300 Subject: 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]. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- meta/lib/oe/patch.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta') diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 4e77168dab..2464efdbe5 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -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) -- cgit v1.2.3