this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

No long accidentally remove module

- There was a bug in the spec, when updating/upgrading would delete the kernel
module after it was successfully added, due to the version number being the
same. This is finally fixed

Signed-off-by: Andy Neff <andy@visionsystemsinc.com>

+9 -12
+9 -12
rpm/SPECS/darling.spec
··· 71 71 72 72 %{__install} -m 644 %{SOURCE1} %{?buildroot}/usr/src/%{name}-mach-%{version} 73 73 74 - # Note: This is run AFTER the new version is installed... If the new version 75 - # has the same version number as the old, this means the new version is 76 - # uninstalled. 77 - # Order of events: 78 - # - New version %pre -> (installs files) -> %post 79 - # - Old version %preun -> (uninstalls files) -> %postun 74 + # https://github.com/dell/dkms/issues/25 80 75 %preun mach 81 - /usr/sbin/dkms remove -m %{name}-mach -v %{version} --all || : 76 + /usr/sbin/dkms remove -m %{name}-mach -v %{version} --all --rpm_safe_upgrade || : 77 + 78 + %pre mach 79 + occurrences=$(/usr/sbin/dkms status "%{name}/%{version}" | wc -l) 80 + if [ ! ${occurrences} -gt 0 ]; then 81 + /usr/sbin/dkms remove -m %{name}-mach -v %{version} --all --rpm_safe_upgrade || : 82 + fi 82 83 83 84 %post mach 84 - occurrences=$(/usr/sbin/dkms status | grep "%{name}" | grep "%{version}" | wc -l) 85 - if [ ! ${occurrences} -gt 0 ]; 86 - then 87 - /usr/sbin/dkms add -m %{name}-mach -v %{version} || : 88 - fi 85 + /usr/sbin/dkms add -m %{name}-mach -v %{version} --rpm_safe_upgrade || : 89 86 /usr/sbin/dkms build -m %{name}-mach -v %{version} || : 90 87 /usr/sbin/dkms install -m %{name}-mach -v %{version} || : 91 88