diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-17 16:16:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-17 16:16:52 +0000 |
commit | 01c0dc37ff3188cb960a3e90cae8fda97c02cdd5 (patch) | |
tree | 09f691b60d0affe847ab877e9807308d4694e01f /URPM/Resolve.pm | |
parent | 0ae9dd3c17c5d66a99d884d0e8bdb18566f9105c (diff) | |
download | perl-URPM-01c0dc37ff3188cb960a3e90cae8fda97c02cdd5.tar perl-URPM-01c0dc37ff3188cb960a3e90cae8fda97c02cdd5.tar.gz perl-URPM-01c0dc37ff3188cb960a3e90cae8fda97c02cdd5.tar.bz2 perl-URPM-01c0dc37ff3188cb960a3e90cae8fda97c02cdd5.tar.xz perl-URPM-01c0dc37ff3188cb960a3e90cae8fda97c02cdd5.zip |
- choose every kernel-<flavor>-devel-<version> packages when
kernel-<flavor>-<version> is selected
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index d4a9fb5..6406642 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -182,17 +182,30 @@ sub _find_required_package__sort { } #- prefer kernel-source-stripped over kernel-source - { - my (@k_chosen, $stripped_kernel); - foreach my $p (@chosen) { - if ($p->name =~ /^kernel-source-stripped/) { #- fast, but unportable - unshift @k_chosen, $p; - $stripped_kernel = 1; + if ($chosen[0]->name =~ /^kernel-(.*source-|.*-devel-)/) { + + my @l = grep { + if ($_->name =~ /^kernel-.*source-stripped-(.*)/) { + my $version = quotemeta($1); + find { + $_->name =~ /-$version$/ && ($_->flag_installed || $_->flag_selected); + } $urpm->packages_providing('kernel'); + } elsif ($_->name =~ /(kernel-.*)-devel-(.*)/) { + my $kernel = "$1-$2"; + _is_selected_or_installed($urpm, $db, $kernel); + } elsif ($_->name =~ /^kernel-.*source-/) { + #- hopefully we don't have a media with kernel-source but not kernel-source-stripped nor kernel-.*-devel + 0; } else { - push @k_chosen, $p; + $urpm->{debug_URPM}("unknown kernel-source package " . $_->fullname) if $urpm->{debug_URPM}; + 0; } + } @chosen; + + if (@l) { + $urpm->{debug_URPM}("packageCallbackChoices: kernel source chosen " . join(",", map { $_->name } @l) . " in " . join(",", map { $_->name } @chosen)) if $urpm->{debug_URPM}; + return \@l, \@l; } - return \@k_chosen if $stripped_kernel; } if ($urpm->{media}) { |