diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-09-21 09:49:45 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-09-21 09:49:45 +0000 |
commit | bf65ec370d67740b25ab25e020f8dfdd3358d5d2 (patch) | |
tree | 32a7e12a1e808c812654637fb6d37160a49b8129 | |
parent | ea9cd4d20f22ebb0a911d94a6a2917a2af66d767 (diff) | |
download | perl-URPM-bf65ec370d67740b25ab25e020f8dfdd3358d5d2.tar perl-URPM-bf65ec370d67740b25ab25e020f8dfdd3358d5d2.tar.gz perl-URPM-bf65ec370d67740b25ab25e020f8dfdd3358d5d2.tar.bz2 perl-URPM-bf65ec370d67740b25ab25e020f8dfdd3358d5d2.tar.xz perl-URPM-bf65ec370d67740b25ab25e020f8dfdd3358d5d2.zip |
Invert bogus check
-rw-r--r-- | URPM/Resolve.pm | 10 |
1 files 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; } |