Consider apt/yum upgrade operation check in package scripts.

Include the upgrade operation check in the prerm and postun scripts
in package.

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


[ROCm/ROCR-Runtime commit: a496adafaa]
Этот коммит содержится в:
Saravanan Solaiyappan
2022-02-24 10:26:04 -05:00
родитель 523e6e883a
Коммит 66a81cc965
2 изменённых файлов: 3 добавлений и 2 удалений
+1 -1
Просмотреть файл
@@ -53,7 +53,7 @@ rm_ldconfig() {
}
case "$1" in
( remove )
( remove | upgrade)
rm_ldconfig
;;
( * )
+2 -1
Просмотреть файл
@@ -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