summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/patch.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-28 10:13:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 12:36:02 +0100
commit9253e927d7dd26c10635f2a788e95c80a92fd90d (patch)
treee3655e76365c0b0ca08c83eeb61fd1bd4445490b /meta/lib/oe/patch.py
parentfc209e99eca97c4cc01b08eaaf7ba3ce8ac4e894 (diff)
downloadpoky-9253e927d7dd26c10635f2a788e95c80a92fd90d.tar.gz
lib/oe/patch: handle patches that delete files with older git
When running "git add" on a directory with older git versions, deleted files aren't added to what is to be committed unless you explicitly specify the -A option. The result of this is that when applying a patch from a recipe which doesn't apply with "git am" (and we fall back to applying the patch through other means then "git add" following by a "git commit") these deletes weren't committed with the patch, leaving them sitting deleted but not committed at the end. This should fix test_devtool_modify_native (which unwittingly exercises this scenario by attempting to run "devtool modify" on apt-native) on machines with older git versions. (From OE-Core rev: 367ffba394bb815d776f48a367d5d7e5ea9b3bba) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r--meta/lib/oe/patch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index c4f042d54b..108bf1de56 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -415,7 +415,7 @@ class GitApplyTree(PatchTree):
415 # Fall back to patch 415 # Fall back to patch
416 output = PatchTree._applypatch(self, patch, force, reverse, run) 416 output = PatchTree._applypatch(self, patch, force, reverse, run)
417 # Add all files 417 # Add all files
418 shellcmd = ["git", "add", "-f", "."] 418 shellcmd = ["git", "add", "-f", "-A", "."]
419 output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) 419 output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
420 # Exclude the patches directory 420 # Exclude the patches directory
421 shellcmd = ["git", "reset", "HEAD", self.patchdir] 421 shellcmd = ["git", "reset", "HEAD", self.patchdir]