Skip to content

Commit

Permalink
Always remove during spl-dkms uninstall/update
Browse files Browse the repository at this point in the history
Always do a dkms remove during %preun so that no cruft is left behind after upgrade or uninstall.

Fixes openzfs/spl#476

Signed-off-by: Nathaniel Clark <[email protected]>
  • Loading branch information
utopiabound authored and nedbass committed Sep 29, 2015
1 parent 99108db commit a61b38c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions rpm/generic/zfs-dkms.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a61b38c

Please sign in to comment.