From c37b689a885ea3a2620f5beac3056b012f4d4423 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 9 Sep 2002 14:25:41 +0000 Subject: 0.70-9mdk --- URPM/Resolve.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'URPM') diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 399a7d0..61b04f3 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -204,6 +204,7 @@ sub resolve_requested { }); } if ($p->flag_installed) { + $p->flag_upgrade or $pkg = $p, last; #- already installed package is taken. if (exists $requested{$p->id}) { push @chosen_requested_upgrade, $p; } else { @@ -334,13 +335,13 @@ sub resolve_requested { my ($p) = @_; if (my @l = $urpm->unsatisfied_requires($db, $state, $p)) { #- try if upgrading the package will be satisfying all the requires - #- else it will be necessary to ask hte user for removing it. + #- else it will be necessary to ask the user for removing it. my $packages = $urpm->find_candidate_packages($p->name); my $best = join '|', map { $_->id } grep { $urpm->unsatisfied_requires($db, $state, $_, name => $n) == 0 } @{$packages->{$p->name}}; - if ($best) { + if (length $best) { push @properties, $best; } else { #- no package have been found, we may need to remove the package examined unless @@ -395,7 +396,7 @@ sub resolve_requested { grep { ! grep { ranges_overlap($_, $property) } $_->provides } @{$packages->{$p->name}}; - if ($best) { + if (length $best) { push @properties, $best; } else { #- no package have been found, we need to remove the package examined. -- cgit v1.2.1