On 6/28/23 20:21, Ricardo Salveti wrote:
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*).

Signed-off-by: Ricardo Salveti <[email protected]>
---
  .../ti-img-rogue-umlibs_23.1.6404501.bb       | 21 ++++++++++++-------
  1 file changed, 14 insertions(+), 7 deletions(-)

diff --git 
a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb
 
b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb
index c012859f..229fc081 100644
--- 
a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb
+++ 
b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb
@@ -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


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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16799): 
https://lists.yoctoproject.org/g/meta-ti/message/16799
Mute This Topic: https://lists.yoctoproject.org/mt/99843566/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to