diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/orphans.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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 ]; } |