From 48fffb5d2c878851b9737169a4c9757d094d457d Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 20 Feb 2009 11:34:34 -0800 Subject: [PATCH] Fix the version stripping in the openafs-modules-dkms scripts --- debian/openafs-modules-dkms.postinst | 3 ++- debian/openafs-modules-dkms.prerm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/openafs-modules-dkms.postinst b/debian/openafs-modules-dkms.postinst index b7de558f2..24bbe0db9 100644 --- a/debian/openafs-modules-dkms.postinst +++ b/debian/openafs-modules-dkms.postinst @@ -4,7 +4,8 @@ set -e # Get the package version, which is the version of openafs-modules-dkms # without the dfsg part and without the Debian version. package=openafs-modules-dkms -version=`dpkg-query -W -f='${Version}' "$package" | sed 's/[.+-].*//'` +version=`dpkg-query -W -f='${Version}' "$package" \ + | sed -e 's/[+-].*//' -e 's/\.dfsg.*//' -e 's/~//g'` dkms add -m openafs -v "$version" if [ "$1" = 'configure' ] ; then diff --git a/debian/openafs-modules-dkms.prerm b/debian/openafs-modules-dkms.prerm index 317d2b71b..924fc6e05 100644 --- a/debian/openafs-modules-dkms.prerm +++ b/debian/openafs-modules-dkms.prerm @@ -5,7 +5,8 @@ set -e # without the dfsg part and without the Debian version. I hope this is always # correct when running prerm and we won't get the new version. package=openafs-modules-dkms -version=`dpkg-query -W -f='${Version}' "$package" | sed 's/[.+-].*//'` +version=`dpkg-query -W -f='${Version}' "$package" \ + | sed -e 's/[+-].*//' -e 's/\.dfsg.*//' -e 's/~//g'` dkms remove -m openafs -v "$version" --all -- 2.39.5