[oe-commits] [openembedded-core] 02/70: classes/externalsrc: handle if cleandirs contains python expressions

git at git.openembedded.org git at git.openembedded.org
Wed Apr 4 12:55:21 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit cf8b9c82710ed7820292ef95500b9b18c05aeb74
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Wed Apr 4 23:02:35 2018 +1200

    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 at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/externalsrc.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 3f1d396..ce8517c 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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list