aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-08-20 16:17:08 +0000
committerFrancois Pons <fpons@mandriva.com>2003-08-20 16:17:08 +0000
commit1d568cf14211a156cefce841234cde3294d7ad00 (patch)
treea3c17201b0270b17b4c2e3ac79c1db1060678bbf /URPM
parent94f54d725c6da7a6f91bf4701b4a5af28d0dd2fd (diff)
downloadperl-URPM-1d568cf14211a156cefce841234cde3294d7ad00.tar
perl-URPM-1d568cf14211a156cefce841234cde3294d7ad00.tar.gz
perl-URPM-1d568cf14211a156cefce841234cde3294d7ad00.tar.bz2
perl-URPM-1d568cf14211a156cefce841234cde3294d7ad00.tar.xz
perl-URPM-1d568cf14211a156cefce841234cde3294d7ad00.zip
final 0.93-7mdk
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index f0dac96..1354f37 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -575,7 +575,10 @@ sub resolve_requested {
$rv->{obsoleted} = 1;
}
+ #- avoid diff_provides on obsoleted provides.
+ my %obsoletes; @obsoletes{$p->obsoletes} = ();
foreach ($p->provides) {
+ exists $obsoletes{$_} and next;
#- check differential provides between obsoleted package and newer one.
if (my ($pn, $ps) = /^([^\s\[]*)(?:\[\*\])?\[?([^\s\]]*\s*[^\s\]]*)/) {
$diff_provides{$pn} = undef;
@@ -615,6 +618,7 @@ sub resolve_requested {
if (my ($n, $o, $v) = /^([^\s\[]*)(?:\[\*\])?\s*\[?([^\s\]]*)\s*([^\s\]]*)/) {
foreach (keys %{$urpm->{provides}{$n} || {}}) {
my $p = $urpm->{depslist}[$_];
+ $pkg == $p and next;
$p->name eq $n && (!$o || eval($p->compare($v) . $o . 0)) or next;
$state->{rejected}{$p->fullname}{closure}{$pkg->fullname} = undef;
}
@@ -932,13 +936,7 @@ sub request_packages_to_upgrade {
}
my $p = $names{$pkg->name};
- if ($p) {
- if ($pkg->compare_pkg($p) > 0) {
- $names{$pkg->name} = $pkg;
- }
- } else {
- $names{$pkg->name} = $pkg;
- }
+ !$p || $pkg->compare_pkg($p) > 0 and $names{$pkg->name} = $pkg;
}
}