]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/patch.py: Ignore scissors line on applying patch
authorTomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Sun, 31 Jan 2021 10:46:49 +0000 (11:46 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 8 Feb 2021 16:15:17 +0000 (06:15 -1000)
The "devtool modify" could remove message body before scissors line, so
patches re-generated from git tree were incorrectly modified.
Adding --no-scissors to "git am" invocation to prevent this behaviour.

[YOCTO #12674]

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 13ea33fbd197b9ee3cf913d9995617115f22798f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oe/patch.py

index 7ca2e28b1f25aa07cd761d17f25acce0b822b0dc..7cd8436da522392f021ac7beac0788c11cd2b64b 100644 (file)
@@ -512,7 +512,7 @@ class GitApplyTree(PatchTree):
             try:
                 shellcmd = [patchfilevar, "git", "--work-tree=%s" % reporoot]
                 self.gitCommandUserOptions(shellcmd, self.commituser, self.commitemail)
-                shellcmd += ["am", "-3", "--keep-cr", "-p%s" % patch['strippath']]
+                shellcmd += ["am", "-3", "--keep-cr", "--no-scissors", "-p%s" % patch['strippath']]
                 return _applypatchhelper(shellcmd, patch, force, reverse, run)
             except CmdError:
                 # Need to abort the git am, or we'll still be within it at the end