summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--urpm/orphans.pm8
2 files changed, 5 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 8eb62298..1d4aab76 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- do not use aria2 deprecated option (Sam Bailey, mga#7781)
+- do not offer to remove DKMS modules for current kernel (mga#5092
Version 7.9 - 11 October 2012, by Thierry Vignaud
diff --git a/urpm/orphans.pm b/urpm/orphans.pm
index e056d105..e389bded 100644
--- a/urpm/orphans.pm
+++ b/urpm/orphans.pm
@@ -347,7 +347,7 @@ sub _will_prop_still_be_needed {
sub _get_current_kernel_package() {
my $release = (POSIX::uname())[2];
# --qf '%{name}' is used in order to provide the right format:
- -e "/boot/vmlinuz-$release" && `rpm -qf --qf '%{name}' /boot/vmlinuz-$release`;
+ -e "/boot/vmlinuz-$release" && ($release, `rpm -qf --qf '%{name}' /boot/vmlinuz-$release`);
}
@@ -415,7 +415,7 @@ sub _all_unrequested_orphans {
}
my $unreq_list = unrequested_list($urpm);
- my $current_kernel = _get_current_kernel_package();
+ my ($current_kernel_version, $current_kernel) = _get_current_kernel_package();
while (my $pkg = shift @$req) {
# do not do anything regarding kernels if we failed to detect the running one (ie: chroot)
@@ -440,8 +440,8 @@ sub _all_unrequested_orphans {
add2hash_(\%l, $requested_kernels{$_});
}
- # do not offer to remove current kernel:
- delete $l{$current_kernel};
+ # do not offer to remove current kernel or DKMS modules for current kernel:
+ do { delete $l{$_} } foreach grep { /$current_kernel_version/ } keys %l;
[ values %l ];
}