diff options
-rw-r--r-- | URPM/Resolve.pm | 19 | ||||
-rw-r--r-- | perl-URPM.spec | 6 |
2 files changed, 20 insertions, 5 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 2cb1791..ad92f44 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -333,10 +333,21 @@ sub resolve_requested { if ($best) { push @properties, $best; } else { - #- no package have been found, we need to remove the package examined. - $options{keep_state} or - $urpm->resolve_closure_ask_remove($db, $state, $p, - { unsatisfied => \@l, id => $pkg->id }); + #- no package have been found, we may need to remove the package examined unless + #- there exists a package that provided the unsatisfied requires. + my @best; + foreach (@l) { + $packages = $urpm->find_candidate_packages($_); + push @best, join('|', map { $_->id } map { @{$_ || []} } values %$packages); + } + + if (@best == @l) { + push @properties, @best; + } else { + $options{keep_state} or + $urpm->resolve_closure_ask_remove($db, $state, $p, + { unsatisfied => \@l, id => $pkg->id }); + } } } }); diff --git a/perl-URPM.spec b/perl-URPM.spec index aedcd83..7223783 100644 --- a/perl-URPM.spec +++ b/perl-URPM.spec @@ -1,7 +1,7 @@ %define name perl-URPM %define real_name URPM %define version 0.70 -%define release 4mdk +%define release 5mdk %{expand:%%define rpm_version %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' rpm)} @@ -49,6 +49,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 29 2002 François Pons <fpons@mandrakesoft.com> 0.70-5mdk +- fixed split of package that could lead to excesive number of + package proposed to be removed. + * Thu Aug 29 2002 François Pons <fpons@mandrakesoft.com> 0.70-4mdk - fixed requires examination for right locales. |