diff options
author | Francois Pons <fpons@mandriva.com> | 2002-09-09 14:25:41 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-09-09 14:25:41 +0000 |
commit | c37b689a885ea3a2620f5beac3056b012f4d4423 (patch) | |
tree | fe54e535a9dd71c8dd6433fcc0fd89247ed4b40d /URPM | |
parent | 189f5c8198ea8d25f18c4afb9b804daa6ff3ea05 (diff) | |
download | perl-URPM-c37b689a885ea3a2620f5beac3056b012f4d4423.tar perl-URPM-c37b689a885ea3a2620f5beac3056b012f4d4423.tar.gz perl-URPM-c37b689a885ea3a2620f5beac3056b012f4d4423.tar.bz2 perl-URPM-c37b689a885ea3a2620f5beac3056b012f4d4423.tar.xz perl-URPM-c37b689a885ea3a2620f5beac3056b012f4d4423.zip |
0.70-9mdk
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Resolve.pm | 7 |
1 files changed, 4 insertions, 3 deletions
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. |