ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming
PATCH 1/2 ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming
latest OE-core does not promote using trailing slash to make pseudo's life easier
--- classes/ti-pdk-fetch.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
classes/ti-pdk-fetch.bbclass +2 -2
@@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}" PE = "2" TI_PDK_COMP ?= "" -TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}" +TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}" TI_PDK_SOURCE_PN = "ti-pdk-source" TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}" TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git" -S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}" +S = "${WORKDIR}/git${TI_PDK_COMP_PATH}" # Hard-link only required sources from PDK python do_unpack_append() {
Signature · 1 line
2.28.0
PATCH 2/2 ti-rtos-firmware: Remove trailing slash from S
--- recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb +1 -1
@@ -51,7 +51,7 @@ CORESDK_RTOS_FILE_PREFIX ?= "" CORESDK_RTOS_FILE_SUFFIX ?= "" # Common code below -S = "${WORKDIR}/lib/" +S = "${WORKDIR}/lib" PV = "${CORESDK_RTOS_VERSION_DOT}"
Signature · 1 line
2.28.0
Re: [meta-ti] [PATCH 2/2] ti-rtos-firmware: Remove trailing slash from S
Quoted 1 line · Khem Raj
Signed-off-by Khem Raj <[email protected]>
Quoted 24 lines
--- recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb +1
-1@@ -51,7 +51,7 @@ CORESDK_RTOS_FILE_PREFIX ?= "" CORESDK_RTOS_FILE_SUFFIX ?= "" # Common code below -S = "${WORKDIR}/lib/" +S = "${WORKDIR}/lib" PV = "${CORESDK_RTOS_VERSION_DOT}"Signature · 1 line
2.28.0
Quoted 13 lines · Khem Raj
latest OE-core does not promote using trailing slash to make pseudo's life easier
Signed-off-by Khem Raj <[email protected]>--- classes/ti-pdk-fetch.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)classes/ti-pdk-fetch.bbclass +0
-0
classes/ti-pdk-fetch.bbclass PV = "${TI_PDK_VERSION}" · line 12
Quoted 5 lines
classes/ti-pdk-fetch.bbclass +1
-1@@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}" PE = "2" TI_PDK_COMP ?= "" -TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}" +TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}"
This one I don't understand - even when TI_PDK_COMP is empty, TI_PDK_COMP_PATH will have a trailing slash, hence S below will have it too...
Moreover, below in this class there's this line:
src = os.path.join(d.getVar('TI_PDK_SOURCE'),'packages',d.getVar('TI_PDK_COMP_PATH'))
If TI_PDK_COMP_PATH starts with a leading slash, os.path.join treats it as absolute and the resulting "src" var will be completely wrong.
So, I believe this change is incorrect.
Quoted 16 lines
classes/ti-pdk-fetch.bbclass +1
-1TI_PDK_SOURCE_PN = "ti-pdk-source" TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}" TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git" -S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}" +S = "${WORKDIR}/git${TI_PDK_COMP_PATH}" # Hard-link only required sources from PDK python do_unpack_append() {Signature · 1 line
2.28.0
Quoted 16 lines · Denys Dmytriyenko
Quoted 15 lines · Khem Raj
latest OE-core does not promote using trailing slash to make pseudo's life easier
Signed-off-by Khem Raj <[email protected]>--- classes/ti-pdk-fetch.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)classes/ti-pdk-fetch.bbclass +0
-0@@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}" PE = "2"
Quoted 7 lines
classes/ti-pdk-fetch.bbclass PV = "${TI_PDK_VERSION}" · line 12
Quoted 3 lines
classes/ti-pdk-fetch.bbclass +1
-1TI_PDK_COMP ?= "" -TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}" +TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}"This one I don't understand - even when
TI_PDK_COMPis empty,TI_PDK_COMP_PATHwill have a trailing slash, hence S below will have it too...
Right I think I was thinking of ensuring that we can make conditional to have the slash always and then remove it from S which is missing
I guess it needs to be solved differently
Quoted 8 lines
Moreover, below in this class there's this line:
src = os.path.join(d.getVar('TI_PDK_SOURCE'),'packages',d.getVar('TI_PDK_COMP_PATH'))
If
TI_PDK_COMP_PATHstarts with a leading slash, os.path.join treats it as absolute and the resulting "src" var will be completely wrong.
This is not going to be problem it will just use // in worst case
Quoted 22 lines
So, I believe this change is incorrect.
Quoted 16 lines
classes/ti-pdk-fetch.bbclass +1
-2TI_PDK_SOURCE_PN = "ti-pdk-source" TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}" TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git" -S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}" +S = "${WORKDIR}/git${TI_PDK_COMP_PATH}" # Hard-link only required sources from PDK python do_unpack_append() { --2.28.0
Quoted 36 lines · Khem Raj
Quoted 16 lines · Denys Dmytriyenko
Quoted 15 lines · Khem Raj
latest OE-core does not promote using trailing slash to make pseudo's life easier
Signed-off-by Khem Raj <[email protected]>--- classes/ti-pdk-fetch.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)classes/ti-pdk-fetch.bbclass +0
-0@@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}" PE = "2"Quoted 7 lines
classes/ti-pdk-fetch.bbclass PV = "${TI_PDK_VERSION}" · line 12
Quoted 3 lines
classes/ti-pdk-fetch.bbclass +1
-1TI_PDK_COMP ?= "" -TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}" +TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}"This one I don't understand - even when
TI_PDK_COMPis empty,TI_PDK_COMP_PATHwill have a trailing slash, hence S below will have it too...Right I think I was thinking of ensuring that we can make conditional to have the slash always and then remove it from S which is missing
I guess it needs to be solved differently
Quoted 3 lines
Moreover, below in this class there's this line:
Quoted 8 lines
Quoted 5 lines
src = os.path.join(d.getVar('TI_PDK_SOURCE'),'packages',d.getVar('TI_PDK_COMP_PATH'))
If
TI_PDK_COMP_PATHstarts with a leading slash, os.path.join treats it as absolute and the resulting "src" var will be completely wrong.This is not going to be problem it will just use // in worst case
Nope, I tested - it should combine $TI_PDK_SOURCE/packages/$TI_PDK_COMP_PATH
Quoted 1 line
Quoted 1 line
classes/ti-pdk-fetch.bbclass PV = "${TI_PDK_VERSION}" · line 13
Quoted 1 line
classes/ti-pdk-fetch.bbclass +0
-0print(os.path.join('a','b','c'))
a/b/c
Quoted 1 line
Quoted 1 line
classes/ti-pdk-fetch.bbclass PV = "${TI_PDK_VERSION}" · line 14
Quoted 1 line
classes/ti-pdk-fetch.bbclass +0
-0print(os.path.join('a','b','/c'))
/c
So, if TI_PDK_COMP_PATH starts with slash, it becomes absolute and the final src path will be wrong.
Quoted 21 lines
Quoted 21 lines
So, I believe this change is incorrect.
Quoted 16 lines
classes/ti-pdk-fetch.bbclass +1
-1TI_PDK_SOURCE_PN = "ti-pdk-source" TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}" TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git" -S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}" +S = "${WORKDIR}/git${TI_PDK_COMP_PATH}" # Hard-link only required sources from PDKpython
do_unpack_append(){
--
2.28.0