aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-10-13 12:34:57 +0000
committerFrancois Pons <fpons@mandriva.com>2003-10-13 12:34:57 +0000
commit6de4904105be72e57649f589a80717626a8670c4 (patch)
tree98f79a7ac216647add686e1aef71c8cca01ff582 /URPM
parent5744c8cfbfd4ac2d09fe24b2b31227a97fe1ff70 (diff)
downloadperl-URPM-6de4904105be72e57649f589a80717626a8670c4.tar
perl-URPM-6de4904105be72e57649f589a80717626a8670c4.tar.gz
perl-URPM-6de4904105be72e57649f589a80717626a8670c4.tar.bz2
perl-URPM-6de4904105be72e57649f589a80717626a8670c4.tar.xz
perl-URPM-6de4904105be72e57649f589a80717626a8670c4.zip
fixed to find package with full provides on whatrequires obsoleted, so that
pam-devel is upgraded correctly for example.
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 3612222..30849cd 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -38,8 +38,8 @@ sub find_chosen_packages {
foreach (split '\|', $dep) {
if (/^\d+$/) {
my $pkg = $urpm->{depslist}[$_];
- $pkg->flag_skip || $state->{rejected}{$pkg->fullname} and next;
$pkg->arch eq 'src' || $pkg->is_arch_compat or next;
+ $pkg->flag_skip || $state->{rejected}{$pkg->fullname} and next;
#- determine if this packages is better than a possibly previously chosen package.
$pkg->flag_selected || exists $state->{selected}{$pkg->id} and return $pkg;
if (my $p = $packages{$pkg->name}) {
@@ -51,8 +51,8 @@ sub find_chosen_packages {
} elsif (my ($property, $name) = /^(([^\s\[]*).*)/) {
foreach (keys %{$urpm->{provides}{$name} || {}}) {
my $pkg = $urpm->{depslist}[$_];
- $pkg->flag_skip || exists $state->{rejected}{$pkg->fullname} and next;
$pkg->is_arch_compat or next;
+ $pkg->flag_skip || exists $state->{rejected}{$pkg->fullname} and next;
#- check if at least one provide of the package overlap the property (if sense are needed).
if (!$urpm->{provides}{$name}{$_} || $pkg->provides_overlap($property)) {
#- determine if this packages is better than a possibly previously chosen package.
@@ -654,9 +654,11 @@ sub resolve_requested {
#- already installed.
my $packages = $urpm->find_candidate_packages($p->name, avoided => $state->{rejected});
my $best = join '|', map { $_->id }
- grep { $_->fullname ne $p->fullname &&
- $urpm->unsatisfied_requires($db, $state, $_, name => $n) == 0 }
- @{$packages->{$p->name}};
+ grep { ($_->name eq $p->name ||
+ $_->obsoletes_overlap($p->name." == ".$p->epoch.":".$p->version."-".$p->release))
+ && $_->fullname ne $p->fullname &&
+ $urpm->unsatisfied_requires($db, $state, $_, name => $n) == 0 }
+ map { @{$_ || []} } values %$packages;
if (length $best) {
push @properties, { required => $best, promote => $n, psel => $pkg };