Consider apt/yum upgrade operation check in package scripts.

Include the upgrade operation check in the prerm and postun scripts
for rocm-smi-lib package.

Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ic3dee7ae50a2ac317f1aab88472b6d4805c4de90


[ROCm/rocm_smi_lib commit: 3a3b8dd25d]
Этот коммит содержится в:
Saravanan Solaiyappan
2022-02-24 09:59:02 -05:00
родитель 45763cc1bb
Коммит 913986f721
2 изменённых файлов: 3 добавлений и 2 удалений
+1 -1
Просмотреть файл
@@ -11,7 +11,7 @@ rm_ldconfig() {
}
case "$1" in
( remove )
( remove | upgrade)
rm_ldconfig
;;
( purge )
+2 -1
Просмотреть файл
@@ -1,5 +1,6 @@
# second 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/x86_64-librocm_smi_lib.conf
ldconfig
fi