[meta-xilinx] [meta-xilinx-tools][rel-v2019.1][RFC] externalxsctsrc.bbclass: Fix the source code being removed issue

Manjukumar Matha manjukumar.harthikote-matha at xilinx.com
Tue Jun 25 10:14:31 PDT 2019


cleandirs is not being handled correctly causing the sources to be
removed by the build system. Use oe.path.is_path_parent() (which makes
paths absolute before checking them) to fix the issue.

The patch is derived from:
(From OE-Core rev: 87ec0fb470274d980f8553a85f778809c269c5d7)
(From OE-Core rev: 611cee69d7300a4746edd752c9557af60e7beecc)

Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
---
 classes/externalxsctsrc.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/classes/externalxsctsrc.bbclass b/classes/externalxsctsrc.bbclass
index 6a583d4..0f94a90 100644
--- a/classes/externalxsctsrc.bbclass
+++ b/classes/externalxsctsrc.bbclass
@@ -12,6 +12,9 @@ python () {
     externalsrc = d.getVar('EXTERNALXSCTSRC', True)
 
     if externalsrc:
+        import oe.recipeutils
+        import oe.path
+
         d.setVar('BB_DONT_CACHE', '1')
         d.setVar('S', externalsrc)
         externalsrcbuild = d.getVar('EXTERNALXSCTSRC_BUILD', True)
@@ -48,10 +51,10 @@ python () {
                 d.appendVarFlag(task, "lockfiles", " ${TMPDIR}/singlexscttask.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:
+                if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
                     cleandirs.remove(cleandir)
                     setvalue = True
             if setvalue:
-- 
2.7.4



More information about the meta-xilinx mailing list