diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | urpm/orphans.pm | 7 |
2 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,7 @@ - make sure we don't check certificate in aria2 except when we want to - exclude kernel-source from orphan processing (#53426) +- do not list as orphans kernel packages which where not installe through + dependencies (#53425) Version 6.28.1 - 3 September 2009 diff --git a/urpm/orphans.pm b/urpm/orphans.pm index c88c6fc3..1149fb16 100644 --- a/urpm/orphans.pm +++ b/urpm/orphans.pm @@ -312,7 +312,7 @@ sub _get_current_kernel_package() { # my (@requested_kernels, %kernels); sub _kernel_callback { - my ($pkg) = @_; + my ($pkg, %l) = @_; my $shortname = $pkg->name; my $n = $pkg->fullname; @@ -322,6 +322,9 @@ sub _kernel_callback { # only consider real kernels (and not kernel-doc and the like): return if $shortname =~ /-(?:source|doc|headers|firmware(?:|-extra))$/; + # ignore requested kernels + return unless %l->{$shortname}; + # keep track of latest kernels in order not to try removing requested kernels: if ($n =~ /latest/) { push @requested_kernels, $pkg->requires; @@ -356,7 +359,7 @@ sub _all_unrequested_orphans { while (my $pkg = shift @$req) { # do not do anything regarding kernels if we failed to detect the running one (ie: chroot) - _kernel_callback($pkg) if $current_kernel; + _kernel_callback($pkg, %l) if $current_kernel; foreach my $prop ($pkg->requires, $pkg->suggests) { my $n = URPM::property2name($prop); foreach my $p (@{$provides{$n} || []}) { |