Files
rocm-systems/projects/amdsmi/RPM/postun.in
T
Bill(Shuzhou) Liu cff55d1a6f Remove python pyc file when uninstall rpm
Remove python pyc file when uninstall rpm.

Change-Id: I6520b51aac34060b5b90f94a016cec1827a4973f


[ROCm/amdsmi commit: 42f11bdd63]
2022-06-09 09:00:38 -04:00

10 lines
390 B
Plaintext
Executable File

# second term originates from ENABLE_LDCONFIG = ON/OFF at package build
if [ $1 -le 1 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then
# perform the below actions for rpm remove($1=0) or upgrade($1=1) operations
rm -f /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf
ldconfig
fi
# remove pyc file generated by python
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/libexec/rocm_smi/__pycache__