From b629dd18884469699b65825a99c829fcc6fc6a0a Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Thu, 2 Aug 2018 06:49:48 -0400 Subject: [PATCH] spec: Only remove ldconf file if uninstalling $1 is passed in during install/upgrade/uninstall. If this is an uninstall, remove the ldconf file, otherwise leave it. In yum-based systems, the uninstall from the old package is executed after the post-install of the newer package, which will undo the ldconf work from the newer package. Change-Id: I1681cb3bc65f0bd802bce5703187ae5f4d3f3530 --- RPM/rpm_postun | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RPM/rpm_postun b/RPM/rpm_postun index 0b130e27e8..fb6028fd85 100644 --- a/RPM/rpm_postun +++ b/RPM/rpm_postun @@ -1 +1,3 @@ -rm -f /etc/ld.so.conf.d/x86_64-libhsakmt.conf && ldconfig +if [ $1 -eq 0 ]; then + rm -f /etc/ld.so.conf.d/x86_64-libhsakmt.conf && ldconfig +fi