diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-04-04 23:02:35 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-04-05 14:48:58 +0100 |
commit | 611cee69d7300a4746edd752c9557af60e7beecc (patch) | |
tree | df952fbd7424bf700f8b6953d2e06dc6fcdd04cc /meta | |
parent | c168f6fe35ada66f7d6d6b5151fa248230c38676 (diff) | |
download | openembedded-core-contrib-611cee69d7300a4746edd752c9557af60e7beecc.tar.gz |
classes/externalsrc: handle if cleandirs contains python expressions
Use the existing oe.recipeutils.split_var_value() function to split the
unexpanded value of the cleandirs varflag, in case it contains python
expressions - we don't want to split the expression itself as the chunks
will not expand properly individually and we can miss something that
expands to the source tree (and thus it can get deleted, the avoidance
of which is the whole point of this code).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/externalsrc.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index 3f1d39689b8..ce8517c58b7 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -53,6 +53,8 @@ python () { d.setVar('BB_DONT_CACHE', '1') if externalsrc: + import oe.recipeutils + d.setVar('S', externalsrc) if externalsrcbuild: d.setVar('B', externalsrcbuild) @@ -85,7 +87,7 @@ python () { d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean) - cleandirs = (d.getVarFlag(task, 'cleandirs', False) or '').split() + cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '') setvalue = False for cleandir in cleandirs[:]: if d.expand(cleandir) == externalsrc: |