diff options
Diffstat (limited to 'urpm/orphans.pm')
-rw-r--r-- | urpm/orphans.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/urpm/orphans.pm b/urpm/orphans.pm index a5d5cc5c..11bd555e 100644 --- a/urpm/orphans.pm +++ b/urpm/orphans.pm @@ -1,7 +1,7 @@ package urpm::orphans; use strict; -use urpm::util qw(add2hash_ append_to_file cat_ output_safe partition put_in_hash uniq wc_l); +use urpm::util qw(add2hash_ append_to_file cat_ member output_safe partition put_in_hash uniq wc_l); use urpm::msg; use urpm; @@ -519,12 +519,22 @@ sub _all_unrequested_orphans { my (%l, %provides); # 1- list explicit provides (not files) from installed packages: + + my $need_expand = 0; foreach my $pkg (@$unreq) { $l{$pkg->fullname} = $pkg; + my $n = $pkg->name; + # Instead of hardcoding desktop/linus/server/... flavors, blacklist: + $need_expand++ if $n =~ /^kernel-(\w+)$/ && !member($1, qw(doc firmware source)); push @{$provides{$_}}, $pkg foreach $pkg->provides_nosense; } my $unreq_list = unrequested_list($urpm); + # we need to replace/augment eg "kernel-desktop" by the "kernel-desktop-V-R" for each installed kernel: + if ($need_expand) { + $kernels{$_->fullname} = $_ foreach grep { /^kernel/ } @$unreq; + } + my ($current_kernel_version, $current_kernel) = _get_current_kernel_package(); # 2- check if "unrequested" packages are still needed: |