From bf65ec370d67740b25ab25e020f8dfdd3358d5d2 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 21 Sep 2006 09:49:45 +0000 Subject: Invert bogus check --- URPM/Resolve.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index b82ea85..03e5f8e 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -542,12 +542,12 @@ sub resolve_requested { }); } if ($pkg->flag_installed && !$pkg->flag_upgrade) { - my $allow; - #- the same or a more recent package is installed, + my $allow = 1; $db->traverse_tag('name', [ $pkg->name ], sub { - my ($p) = @_; - $allow ||= $pkg->compare_pkg($p) < 0; - }); + my ($p) = @_; + #- allow if a less recent package is installed, + $allow &&= $pkg->compare_pkg($p) > 0; + }); #- if nothing has been found, just ignore it. $allow or next; } -- cgit v1.2.1