Skip to content

Commit

Permalink
RPM: Remove old versions of DKMS on upgrade
Browse files Browse the repository at this point in the history
Due to a mismatch between the text and a regex looking for that text,
the `%preuninstall` script would never run the `dkms remove` command
necessary to avoid corrupting the DKMS data configuration.  Increase
regex specificity to avoid this issue.

Closes: #9891
Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
  • Loading branch information
ColMelvin committed May 14, 2020
1 parent b29e31d commit 5df480a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpm/generic/zfs-dkms.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fi
CONFIG_H="/var/lib/dkms/%{module}/%{version}/*/*/%{module}_config.h"
SPEC_META_ALIAS="@PACKAGE@-@VERSION@-@RELEASE@"
DKMS_META_ALIAS=`cat $CONFIG_H 2>/dev/null |
awk -F'"' '/META_ALIAS/ { print $2; exit 0 }'`
awk -F'"' '/META_ALIAS\s+"/ { print $2; exit 0 }'`
if [ "$SPEC_META_ALIAS" = "$DKMS_META_ALIAS" ]; then
echo -e
echo -e "Uninstall of %{module} module ($SPEC_META_ALIAS) beginning:"
Expand Down

0 comments on commit 5df480a

Please sign in to comment.