diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | urpm/orphans.pm | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -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 ]; } |