summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-10-28 10:05:37 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 11:18:56 +0000
commit4b863f98e27143cf874d8fe8f0bb426aa590b75a (patch)
tree41debd3e582086136677a1e3dbd83ee5fd439cde /meta/classes
parentbc73d2c63b48d51d41fd8c2eaa43c941b02c7e2e (diff)
downloadpoky-4b863f98e27143cf874d8fe8f0bb426aa590b75a.tar.gz
devtool: fix modify with patches in override directories
If a recipe applies patches which are in machine-specific override directories, devtool will fail to fetch the patches that don't match the default configuration. For example where there are patches at qemux86/x86.patch and qemuarm/arm.patch: SRC_URI = "file://source" SRC_URI_append_qemuarm = " file://arm.patch" SRC_URI_append_qemux86 = " file://x86.patch" The patch apply phase sets OVERRIDES but does not set FILESOVERRIDES, so it cannot find the patch files as the search path isn't correct. Fix this by setting FILESOVERRIDES too. Also when iterating through the overrides we need to be sure that other overrides that are used are not enabled, so extend no_overrides instead of simply appending the current override. Fixes most but not all of [ YOCTO #14060 ]. (From OE-Core rev: a372cdf8e175423c47faeecc98ad076ee26bbec8) (From OE-Core rev: b20699229671ef37daac8b0ed1133aacb477f6a0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4a35bcc9d164ac038a31356a15a0f61ccdd38be2) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/devtool-source.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/devtool-source.bbclass b/meta/classes/devtool-source.bbclass
index 280d6009f3..41900e651f 100644
--- a/meta/classes/devtool-source.bbclass
+++ b/meta/classes/devtool-source.bbclass
@@ -199,6 +199,7 @@ python devtool_post_patch() {
199 # Run do_patch function with the override applied 199 # Run do_patch function with the override applied
200 localdata = bb.data.createCopy(d) 200 localdata = bb.data.createCopy(d)
201 localdata.setVar('OVERRIDES', ':'.join(no_overrides)) 201 localdata.setVar('OVERRIDES', ':'.join(no_overrides))
202 localdata.setVar('FILESOVERRIDES', ':'.join(no_overrides))
202 bb.build.exec_func('do_patch', localdata) 203 bb.build.exec_func('do_patch', localdata)
203 rm_patches() 204 rm_patches()
204 # Now we need to reconcile the dev branch with the no-overrides one 205 # Now we need to reconcile the dev branch with the no-overrides one
@@ -216,7 +217,8 @@ python devtool_post_patch() {
216 # Reset back to the initial commit on a new branch 217 # Reset back to the initial commit on a new branch
217 bb.process.run('git checkout %s -b devtool-override-%s' % (initial_rev, override), cwd=srcsubdir) 218 bb.process.run('git checkout %s -b devtool-override-%s' % (initial_rev, override), cwd=srcsubdir)
218 # Run do_patch function with the override applied 219 # Run do_patch function with the override applied
219 localdata.appendVar('OVERRIDES', ':%s' % override) 220 localdata.setVar('OVERRIDES', ':'.join(no_overrides + [override]))
221 localdata.setVar('FILESOVERRIDES', ':'.join(no_overrides + [override]))
220 bb.build.exec_func('do_patch', localdata) 222 bb.build.exec_func('do_patch', localdata)
221 rm_patches() 223 rm_patches()
222 # Now we need to reconcile the new branch with the no-overrides one 224 # Now we need to reconcile the new branch with the no-overrides one