ti-img-rogue-umlibs: use image path to avoid local path expansion
PATCH 1/1 ti-img-rogue-umlibs: use image path to avoid local path expansion
Provide a package file list based on the image path to avoid it later be expanded by using the host system path.
Fixes a package QA error when files named similarly are provided by the host system (e.g. /usr/bin/oclock is a match for /usr/bin/ocl*).
--- .../ti-img-rogue-umlibs_23.1.6404501.bb | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +14 -7
@@ -38,32 +38,39 @@ PACKAGECONFIG[vulkan] = ",,,${VULKAN_LIB_PACKAGES}" PACKAGECONFIG[opencl] = ",,,${OPENCL_LIB_PACKAGES},libopencl-rogue-tools" def get_file_list(package_list_var, d): + import os + image_dir = d.getVar("D") file_list = [] package_list = d.getVar(package_list_var) if package_list: for package in package_list.split(): package_files = d.getVar(f"FILES:{package}") if package_files: - file_list.append(package_files) + for f in package_files.split(): + if os.path.isabs(f): + f = '.' + f + if not f.startswith("./"): + f = './' + f + file_list.append(os.path.join(image_dir, f)) return " ".join(file_list) do_install:append() { if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then for file in ${@get_file_list('GLES_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done fi if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done fi if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done fi if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
Signature · 1 line
2.34.1
Quoted 52 lines · Ricardo Salveti
Provide a package file list based on the image path to avoid it later be expanded by using the host system path.
Fixes a package QA error when files named similarly are provided by the host system (e.g.
/usr/bin/oclockis a match for/usr/bin/ocl*).Signed-off-by Ricardo Salveti <[email protected]>--- .../ti-img-rogue-umlibs_23.1.6404501.bb | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +12
-5@@ -38,32 +38,39 @@ PACKAGECONFIG[vulkan] = ",,,${VULKAN_LIB_PACKAGES}" PACKAGECONFIG[opencl] = ",,,${OPENCL_LIB_PACKAGES},libopencl-rogue-tools" def get_file_list(package_list_var, d): + import os + image_dir = d.getVar("D") file_list = [] package_list = d.getVar(package_list_var) if package_list: for package in package_list.split(): package_files = d.getVar(f"FILES:{package}") if package_files: - file_list.append(package_files) + for f in package_files.split(): + if os.path.isabs(f): + f = '.' + f + if not f.startswith("./"): + f = './' + f + file_list.append(os.path.join(image_dir, f)) return " ".join(file_list) do_install:append() { if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then for file in ${@get_file_list('GLES_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done fi if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb PACKAGECONFIG[vulkan] = ",,,${VULKAN_LIB_PACKAGES}" · line 76
Quoted 10 lines
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +2
-2fi if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done fi if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
Hey, thanks for the patch. I believe this patch I submitted earlier should also solve the issue you were facing. It's still in the -next branches though.
https://lists.yoctoproject.org/g/meta-ti/message/16790
Randolph
Quoted 69 lines · Randolph Sapp
Quoted 52 lines · Ricardo Salveti
Provide a package file list based on the image path to avoid it later be expanded by using the host system path.
Fixes a package QA error when files named similarly are provided by the host system (e.g.
/usr/bin/oclockis a match for/usr/bin/ocl*).Signed-off-by Ricardo Salveti <[email protected]>--- .../ti-img-rogue-umlibs_23.1.6404501.bb | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +12
-5@@ -38,32 +38,39 @@ PACKAGECONFIG[vulkan] = ",,,${VULKAN_LIB_PACKAGES}" PACKAGECONFIG[opencl] = ",,,${OPENCL_LIB_PACKAGES},libopencl-rogue-tools" def get_file_list(package_list_var, d): + import os + image_dir = d.getVar("D") file_list = [] package_list = d.getVar(package_list_var) if package_list: for package in package_list.split(): package_files = d.getVar(f"FILES:{package}") if package_files: - file_list.append(package_files) + for f in package_files.split(): + if os.path.isabs(f): + f = '.' + f + if not f.startswith("./"): + f = './' + f + file_list.append(os.path.join(image_dir, f)) return " ".join(file_list) do_install:append() { if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then for file in ${@get_file_list('GLES_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done fi if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) donemeta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb PACKAGECONFIG[vulkan] = ",,,${VULKAN_LIB_PACKAGES}" · line 76
Quoted 10 lines
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +2
-2fi if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do - rm -rf ${D}/${file} - rmdir --ignore-fail-on-non-empty $(dirname ${D}/${file}) + rm -rf ${file} + rmdir --ignore-fail-on-non-empty $(dirname ${file}) done fi if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; thenHey, thanks for the patch. I believe this patch I submitted earlier should also solve the issue you were facing. It's still in the -next branches though.
Cool, didn't notice this one, and yeah, should also solve the same issue.
Thanks!
--
Ricardo Salveti