diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-11 23:02:26 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-14 09:46:59 +0100 |
| commit | 9dff569a074dc919a190303ecee3d18fc74b8610 (patch) | |
| tree | 42ec636ac36058a6a4b1e981d285c7ae99ecb1c8 /meta/classes/externalsrc.bbclass | |
| parent | 9fc670b6a129d7de0ba1b1512e783200c8d9017b (diff) | |
| download | poky-9dff569a074dc919a190303ecee3d18fc74b8610.tar.gz | |
externalsrc/devtool: Fix to work with fixed export funcition flags handling
If we fix bitbake to correctly handle the cleandirs and fakeroot flags
for tasks handled by EXPORT_FUNCTIONS, we break devtool since it only
considers these for top level functions. Add in extra code to intercept
the cleandirs flags for commonly used sub functions too.
[YOCTO #8621]
(From OE-Core rev: 67fad829f37ed0a8e20c599d2b65635158591d06)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
| -rw-r--r-- | meta/classes/externalsrc.bbclass | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index abfe24bace..b2f216f361 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass | |||
| @@ -90,15 +90,16 @@ python () { | |||
| 90 | # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time | 90 | # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time |
| 91 | d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") | 91 | d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") |
| 92 | 92 | ||
| 93 | # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean) | 93 | for funcname in [task, "base_" + task, "kernel_" + task]: |
| 94 | cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '') | 94 | # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean) |
| 95 | setvalue = False | 95 | cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(funcname, 'cleandirs', False) or '') |
| 96 | for cleandir in cleandirs[:]: | 96 | setvalue = False |
| 97 | if oe.path.is_path_parent(externalsrc, d.expand(cleandir)): | 97 | for cleandir in cleandirs[:]: |
| 98 | cleandirs.remove(cleandir) | 98 | if oe.path.is_path_parent(externalsrc, d.expand(cleandir)): |
| 99 | setvalue = True | 99 | cleandirs.remove(cleandir) |
| 100 | if setvalue: | 100 | setvalue = True |
| 101 | d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs)) | 101 | if setvalue: |
| 102 | d.setVarFlag(funcname, 'cleandirs', ' '.join(cleandirs)) | ||
| 102 | 103 | ||
| 103 | fetch_tasks = ['do_fetch', 'do_unpack'] | 104 | fetch_tasks = ['do_fetch', 'do_unpack'] |
| 104 | # If we deltask do_patch, there's no dependency to ensure do_unpack gets run, so add one | 105 | # If we deltask do_patch, there's no dependency to ensure do_unpack gets run, so add one |
