From c37d4bac8f37f46e7869796e1e0ff4c2def21563 Mon Sep 17 00:00:00 2001 From: "Bill(Shuzhou) Liu" Date: Wed, 23 Mar 2022 10:28:48 -0400 Subject: [PATCH] Remove python pyc file when uninstall Remove python pyc file when uninstall. Change-Id: I383faf8fcfaeeb346c9ee38c1aad8577a460281e --- DEBIAN/prerm.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DEBIAN/prerm.in b/DEBIAN/prerm.in index b7bc04b85d..ed421211fa 100755 --- a/DEBIAN/prerm.in +++ b/DEBIAN/prerm.in @@ -10,9 +10,15 @@ rm_ldconfig() { fi } +rm_pyc() { + # remove pyc file generated by python + rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/rocm_smi/bin/__pycache__ +} + case "$1" in ( remove | upgrade) rm_ldconfig + rm_pyc ;; ( purge ) ;;