From c30bea99d094e9d70117e6c4c3f3bd5f44f642d8 Mon Sep 17 00:00:00 2001 From: Raju Kumar Pothuraju Date: Thu, 24 Feb 2022 16:56:26 +0530 Subject: fpgamanager_custom: Split SRC_URI with space Splitting with file:// is not extracting the file name when git path is in between (Ex: file://rp.xsa git://devicetree-xlnx.git file://base.tcl) with above example the xsa path will be "rp.xsa git://devicetree-xlnx.git" which is not proper. To fix this splitting the SRC_URI with space and removes the prefix 'file://'. Signed-off-by: Raju Kumar Pothuraju Signed-off-by: Mark Hatle (cherry picked from commit 091a36ab03c04b5b507e8d862372c4e4d21a9814) Signed-off-by: Mark Hatle --- meta-xilinx-core/classes/fpgamanager_custom.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'meta-xilinx-core/classes') diff --git a/meta-xilinx-core/classes/fpgamanager_custom.bbclass b/meta-xilinx-core/classes/fpgamanager_custom.bbclass index 0b5fa249..848727fb 100644 --- a/meta-xilinx-core/classes/fpgamanager_custom.bbclass +++ b/meta-xilinx-core/classes/fpgamanager_custom.bbclass @@ -30,13 +30,13 @@ python (){ or d.getVar("SRC_URI").count("shell.json") != 1: raise bb.parse.SkipRecipe("Need one '.dtsi', one '.bit' and one 'shell.json' file added to SRC_URI") - d.setVar("DTSI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split('file://') if '.dtsi' in a][0])) - d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split('file://') if '.bit' in a][0])) - d.setVar("JSON_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split('file://') if 'shell.json' in a][0])) + d.setVar("DTSI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtsi' in a][0].lstrip('file://'))) + d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bit' in a][0].lstrip('file://'))) + d.setVar("JSON_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if 'shell.json' in a][0].lstrip('file://'))) #optional input if '.xclbin' in d.getVar("SRC_URI"): - d.setVar("XCL_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split('file://') if '.xclbin' in a][0])) + d.setVar("XCL_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.xclbin' in a][0].lstrip('file://'))) } python do_configure() { import glob, re, shutil -- cgit v1.2.3-54-g00ecf