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.

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Chris Lindee <[email protected]>
Closes: openzfs#9891
Closes openzfs#10327
  • Loading branch information
tonyhutter committed Sep 15, 2020
1 parent 4f5dcc9 commit 4847e44
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 4847e44

Please sign in to comment.