Files
rocm-systems/projects/clr/opencl/packaging/rocm-opencl.prerm
T
Jeremy Newton 91baa9ded6 SWDEV-306293 - fix regression in cleanup
To fix SWDEV-306293, x86_64-rocm-opencl.conf was renamed to
10-rocm-opencl.conf. This was not changes in the clean up, only in the
creation, so the patch causes a regression by not cleaning up the new
filename.

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I4aa456955f6f7c2d52a3560e5e792537f95add17


[ROCm/clr commit: e885ae9591]
2021-12-07 09:59:03 -05:00

29 lines
615 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)
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