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]
Cette révision appartient à :
Saravanan Solaiyappan
2022-02-24 10:26:04 -05:00
Parent 523e6e883a
révision 66a81cc965
2 fichiers modifiés avec 3 ajouts et 2 suppressions
+1 -1
Voir le fichier
@@ -53,7 +53,7 @@ rm_ldconfig() {
}
case "$1" in
( remove )
( remove | upgrade)
rm_ldconfig
;;
( * )
+2 -1
Voir le fichier
@@ -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