[Pkg-dkms-commits] [SCM] Dynamic Kernel Module Support branch, master, updated. debian/2.1.1.2-3-2-g01c7c14
Giuseppe Iuculano
iuculano at debian.org
Sat Jul 17 10:46:43 UTC 2010
The following commit has been merged in the master branch:
commit 01c7c149e40f39fbacd94efe253a75e417336e69
Author: Giuseppe Iuculano <iuculano at debian.org>
Date: Sat Jul 17 12:45:32 2010 +0200
Remove old modules when removing a kernel
Closes: #586724
Thanks: Jan Muszynski
When removing a kernel it would be good to remove all the modules and not just uninstall them.
Issuing a remove instead of an uninstall to dkms will cause the module to be uninstalled first
(if it's not already), then removed. If the kernel is ever re-installed then dkims will
rebuild the module as needed, so nothing is lost by removing the modules for a
reomoved kernel, but you do run a cleaner system.
diff --git a/debian/patches/remove-old-mod.patch b/debian/patches/remove-old-mod.patch
new file mode 100644
index 0000000..25f8e41
--- /dev/null
+++ b/debian/patches/remove-old-mod.patch
@@ -0,0 +1,19 @@
+When removing a kernel it would be good to remove all the modules and not just uninstall them.
+Issuing a remove instead of an uninstall to dkms will cause the module to be uninstalled first
+(if it's not already), then removed. If the kernel is ever re-installed then dkims will
+rebuild the module as needed, so nothing is lost by removing the modules for a
+reomoved kernel, but you do run a cleaner system.
+
+--- a/kernel_prerm.d_dkms
++++ b/kernel_prerm.d_dkms
+@@ -8,8 +8,8 @@ while read line; do
+ name=`echo "$line" | awk '{print $1}' | sed 's/,$//'`
+ vers=`echo "$line" | awk '{print $2}' | sed 's/,$//'`
+ arch=`echo "$line" | awk '{print $4}' | sed 's/:$//'`
+- echo "dkms: uninstalling: $name $vers ($inst_kern) ($arch)" >&2
+- dkms uninstall -m $name -v $vers -k $inst_kern -a $arch
++ echo "dkms: removing: $name $vers ($inst_kern) ($arch)" >&2
++ dkms remove -m $name -v $vers -k $inst_kern -a $arch
+ done < <(dkms status -k $inst_kern 2>/dev/null | grep ": installed")
+ fi
+
diff --git a/debian/patches/series b/debian/patches/series
index 9561239..937a3df 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ improved-error-messages.patch
fix-bashism.patch
manpage-update.patch
use-system-tmpdir.patch
+remove-old-mod.patch
--
Dynamic Kernel Module Support
More information about the Pkg-dkms-commits
mailing list