aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-08-29 15:48:28 +0000
committerFrancois Pons <fpons@mandriva.com>2002-08-29 15:48:28 +0000
commit0d6014e1742bcf140771e71cc2c2138addf38533 (patch)
tree68924ad20af94200959d233b46b622cd80e5fc11 /URPM
parentcb655e1928d6ef4fe77d1638af213754dbca5c7f (diff)
downloadperl-URPM-0d6014e1742bcf140771e71cc2c2138addf38533.tar
perl-URPM-0d6014e1742bcf140771e71cc2c2138addf38533.tar.gz
perl-URPM-0d6014e1742bcf140771e71cc2c2138addf38533.tar.bz2
perl-URPM-0d6014e1742bcf140771e71cc2c2138addf38533.tar.xz
perl-URPM-0d6014e1742bcf140771e71cc2c2138addf38533.zip
0.70-5mdk
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm19
1 files changed, 15 insertions, 4 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 });
+ }
}
}
});