diff --git a/projects/rocr-runtime/runtime/hsa-runtime/DEBIAN/Binary/prerm.in b/projects/rocr-runtime/runtime/hsa-runtime/DEBIAN/Binary/prerm.in index b995a3e8ae..cbc66dff39 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/DEBIAN/Binary/prerm.in +++ b/projects/rocr-runtime/runtime/hsa-runtime/DEBIAN/Binary/prerm.in @@ -53,7 +53,7 @@ rm_ldconfig() { } case "$1" in - ( remove ) + ( remove | upgrade) rm_ldconfig ;; ( * ) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/RPM/Binary/postun.in b/projects/rocr-runtime/runtime/hsa-runtime/RPM/Binary/postun.in index 744a770d22..4c1f8f5eb2 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/RPM/Binary/postun.in +++ b/projects/rocr-runtime/runtime/hsa-runtime/RPM/Binary/postun.in @@ -41,7 +41,8 @@ ################################################################################ # left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build -if [ $1 -eq 0 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then +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/hsa-rocr.conf ldconfig fi