aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--URPM/Resolve.pm12
-rw-r--r--perl-URPM.spec2
2 files changed, 7 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;
}
}
diff --git a/perl-URPM.spec b/perl-URPM.spec
index 69f4b59..b45083f 100644
--- a/perl-URPM.spec
+++ b/perl-URPM.spec
@@ -53,6 +53,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Aug 20 2003 François Pons <fpons@mandrakesoft.com> 0.93-7mdk
+- fixed diff provides to be ignored on obsoleted provides which caused
+ resolver to choose bad package due to removed obsoleted provides.
- added URPM::Signature::compare_pubkeys to workaround rpm
importation of key with modified armor.