]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Fix the version stripping in the openafs-modules-dkms scripts
authorRuss Allbery <rra@debian.org>
Fri, 20 Feb 2009 19:34:34 +0000 (11:34 -0800)
committerRuss Allbery <rra@debian.org>
Fri, 20 Feb 2009 19:34:34 +0000 (11:34 -0800)
debian/openafs-modules-dkms.postinst
debian/openafs-modules-dkms.prerm

index b7de558f27e786dd3bc55501105aeb3b6853ae00..24bbe0db939589a754a028f7661d8e57af3547e7 100644 (file)
@@ -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
index 317d2b71ba6415b8eb76ae9b45978f1c254c8666..924fc6e05d203d516c3433ead803add0e59c7e71 100644 (file)
@@ -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