Files
rocm-systems/opencl/packaging/rocm-ocl-icd.prerm
T
Saravanan Solaiyappan c741a808ae SWDEV-323670 - Remove lib/libOpenCL.so* symlinks during upgrade
During upgrade lib/libOpenCL.so* files/symlinks are not
removed.
This change will remove those symlinks as part of the upgrade
package activity.

Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ia12e89e857b358101f93a6044fe090aa7acafbe0
2022-02-17 09:43:30 -05:00

29 lines
626 B
Bash

#!/bin/bash
set -e
rm_ldconfig() {
rm -f /etc/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
rm -f /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@
}
case "$1" in
purge)
;;
remove | upgrade )
rm -f @ROCM_PATH@/lib/libOpenCL.so
rm -f @ROCM_PATH@/lib/libOpenCL.so.@OPENCL_LIB_VERSION_MAJOR@
rm -f @ROCM_PATH@/lib/libOpenCL.so.@OPENCL_LIB_VERSION_STRING@
if [ -e "@ROCM_PATH@" ] ; then
if [ -e "@ROCM_PATH@/lib" ] ; then
rmdir --ignore-fail-on-non-empty @ROCM_PATH@/lib
fi
rmdir --ignore-fail-on-non-empty @ROCM_PATH@
fi
rm_ldconfig
;;
*)
exit 0
;;
esac