PACKAGE - Remove __pycache__ on uninstall
After running the amd-smi tool, the following directories get created: - /opt/rocm/libexec/amdsmi_cli/__pycache__ - /opt/rocm/share/amd_smi/amdsmi/__pycache__ Those need to be removed so rocm can be cleanly uninstalled. Change-Id: I1738aed444ef9427179e99f6e25ad1beab3d8fab Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Este cometimento está contido em:
+3
-2
@@ -34,8 +34,9 @@ rm_ldconfig() {
|
||||
}
|
||||
|
||||
rm_pyc() {
|
||||
# remove pyc file generated by python
|
||||
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/amd_smi/__pycache__
|
||||
# remove pyc files generated by python
|
||||
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/amdsmi_cli/__pycache__
|
||||
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@SHARE_INSTALL_PREFIX@/amdsmi/__pycache__
|
||||
}
|
||||
|
||||
|
||||
|
||||
+7
-2
@@ -27,10 +27,15 @@ return_logrotateToOrigConfig() {
|
||||
fi
|
||||
}
|
||||
|
||||
rm_pyc() {
|
||||
# remove pyc files generated by python
|
||||
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/amdsmi_cli/__pycache__
|
||||
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@SHARE_INSTALL_PREFIX@/amdsmi/__pycache__
|
||||
}
|
||||
|
||||
if [ $1 -le 1 ]; then
|
||||
# perform the below actions for rpm remove($1=0) or upgrade($1=1) operations
|
||||
# remove pyc file generated by python
|
||||
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/amd_smi/__pycache__
|
||||
rm_pyc
|
||||
rm_logFolder
|
||||
return_logrotateToOrigConfig
|
||||
fi
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador