summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-09-28 15:47:46 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-09-28 15:47:46 +0000
commita6d655f5df5d2547c1effb70d5ce1e7b67d7a483 (patch)
tree32c6a9996cc79b2cfe42154d38549f93368005d6 /urpm
parent6b7da19e7cd91b82c3172c38ac121e003b826f5e (diff)
downloadurpmi-a6d655f5df5d2547c1effb70d5ce1e7b67d7a483.tar
urpmi-a6d655f5df5d2547c1effb70d5ce1e7b67d7a483.tar.gz
urpmi-a6d655f5df5d2547c1effb70d5ce1e7b67d7a483.tar.bz2
urpmi-a6d655f5df5d2547c1effb70d5ce1e7b67d7a483.tar.xz
urpmi-a6d655f5df5d2547c1effb70d5ce1e7b67d7a483.zip
Do not list as orphans kernel packages which where not installe through dependencies (#53425)
Diffstat (limited to 'urpm')
-rw-r--r--urpm/orphans.pm7
1 files changed, 5 insertions, 2 deletions
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} || []}) {