diff options
author | Francois Pons <fpons@mandriva.com> | 2002-07-25 11:19:33 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-07-25 11:19:33 +0000 |
commit | 14b622549eb8340600db94b8ec4082b3c5ee272d (patch) | |
tree | e96e81fb1e46805c851653afc1900a6a87985384 | |
parent | a463ec0e1d236bcb6bd575e9a38ad7111959902f (diff) | |
download | perl-URPM-14b622549eb8340600db94b8ec4082b3c5ee272d.tar perl-URPM-14b622549eb8340600db94b8ec4082b3c5ee272d.tar.gz perl-URPM-14b622549eb8340600db94b8ec4082b3c5ee272d.tar.bz2 perl-URPM-14b622549eb8340600db94b8ec4082b3c5ee272d.tar.xz perl-URPM-14b622549eb8340600db94b8ec4082b3c5ee272d.zip |
0.50-6mdk
-rw-r--r-- | URPM/Resolve.pm | 14 | ||||
-rw-r--r-- | perl-URPM.spec | 5 |
2 files changed, 14 insertions, 5 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 52075e8..d320cb5 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -146,16 +146,22 @@ sub resolve_requested { #- take the best package for each choices of same name. my $packages = $urpm->find_candidate_packages($dep); foreach (values %$packages) { - my $best; + my ($best_requested, $best); foreach (@$_) { - if ($best && $best != $_) { - exists $requested{$_->id} || exists $state->{selected}{$_->id} and $best = $_, last; + exists $state->{selected}{$_->id} and $best_requested = $_, last; + if ($best_requested || exists $requested{$_->id}) { + if ($best_requested && $best_requested != $_) { + $_->compare_pkg($best_requested) > 0 and $best_requested = $_; + } else { + $best_requested = $_; + } + } elsif ($best && $best != $_) { $_->compare_pkg($best) > 0 and $best = $_; } else { $best = $_; } } - $_ = $best; + $_ = $best_requested || $best; } if (keys(%$packages) > 1) { #- package should be prefered if one of their provides is referenced diff --git a/perl-URPM.spec b/perl-URPM.spec index 5c6086a..9ee3008 100644 --- a/perl-URPM.spec +++ b/perl-URPM.spec @@ -1,7 +1,7 @@ %define name perl-URPM %define real_name URPM %define version 0.50 -%define release 5mdk +%define release 6mdk %{expand:%%define rpm_version %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' rpm)} @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jul 25 2002 François Pons <fpons@mandrakesoft.com> 0.50-6mdk +- fixed incomplete search of best requested packages. + * Thu Jul 25 2002 François Pons <fpons@mandrakesoft.com> 0.50-5mdk - fixed stupid error in URPM/Build.pm. |