From a61b38c2d53de6667154e5ef219692fbff7e817b Mon Sep 17 00:00:00 2001 From: Nathaniel Clark Date: Tue, 29 Sep 2015 09:13:51 -0400 Subject: [PATCH] Always remove during spl-dkms uninstall/update Always do a dkms remove during %preun so that no cruft is left behind after upgrade or uninstall. Fixes zfsonlinux/spl#476 Signed-off-by: Nathaniel Clark --- rpm/generic/zfs-dkms.spec.in | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in index a3388225cd..a379f7d93e 100644 --- a/rpm/generic/zfs-dkms.spec.in +++ b/rpm/generic/zfs-dkms.spec.in @@ -62,14 +62,8 @@ echo -e "support or upgrade DKMS to a more current version." exit 1 %preun -# Only remove the modules if they are for this %{version}-%{release}. A -# package upgrade can replace them if only the %{release} is changed. -RELEASE="/var/lib/dkms/%{module}/%{version}/build/%{module}.release" -if [ -f $RELEASE ] && [ `cat $RELEASE`%{?dist} = "%{version}-%{release}" ]; then - echo -e - echo -e "Uninstall of %{module} module (version %{version}) beginning:" - dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade -fi +echo -e "Uninstall of %{module} module (version %{version}) beginning:" +dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade exit 0 %changelog