diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/orphans.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/urpm/orphans.pm b/urpm/orphans.pm index 48d45754..9db0c1ef 100644 --- a/urpm/orphans.pm +++ b/urpm/orphans.pm @@ -442,7 +442,11 @@ sub _all_unrequested_orphans { # do not offer to remove current kernel or DKMS modules for current kernel: delete $l{$current_kernel}; - do { delete $l{$_} } foreach grep { /$current_kernel_version/ } keys %l; + # prevent removing orphan kernels if we failed to detect running kernel version: + if ($current_kernel_version) { + do { delete $l{$_} } foreach grep { /$current_kernel_version/ } keys %l; + } + [ values %l ]; } |