summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorFrederic Martinsons <frederic.martinsons@gmail.com>2023-03-31 07:45:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-01 11:36:24 +0100
commitd86cac2759cf7e91f4ff240833385e28e729ab79 (patch)
tree16f4d7ee54c1ebfdc73166d9a2c93dde2e86c67c /meta-selftest
parent474658a3681c343385c359a21c3693401217298d (diff)
downloadopenembedded-core-contrib-d86cac2759cf7e91f4ff240833385e28e729ab79.tar.gz
patch: support of git patches when the source uri contained subpath parameter
This is for a specific case where: - A recipe use a subpath on a git repo (e.g. git://repo.git/projects;subpath=subproject) - The recipe contains a patch to apply - a devtool modify is used on this recipe With these conditions, the patch cannot be applied at all. GitApplyTree class is used for handling patch under devtool, but when subpath is present in SRC_URI, the resulting git tree is dirty (every files and directories which was not in subpath are suppressed) and so "git am" refuse to apply patches. That would not be an issue since the GitApplyTree have a fallback to PatchTree in case of error, but during this error management, there is a "git reset --hard HEAD" call which suppress the subpath operation and finally prevents the patch to be applied even with PatchTree. When devtool is not involved, only PatchTree class is used and the above problem is irrelevant. To support git patching during devtool, the presence of subpath and the dirtyness of the repo are checked. If both conditions are met, we directly call PatchTree like it was already done in case of error during git apply. Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
0 files changed, 0 insertions, 0 deletions