From 2c31763d63d98a15423e157ff88831adcf8faefc Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 12 Sep 2007 13:07:47 +0000 Subject: simplify --- URPM/Resolve.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'URPM') diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index a3e60dc..31f5c88 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -546,10 +546,11 @@ sub resolve_rejected_ { #- check if the package has already been asked to be rejected (removed or obsoleted). #- this means only add the new reason and return. - if (! $state->{rejected}{$pkg->fullname}) { - my @pkgs_todo = $pkg; + my $newly_rejected = set_rejected($state, $pkg, %options); + + $newly_rejected or return; - set_rejected($state, $pkg, %options); + my @pkgs_todo = $pkg; while (my $cp = shift @pkgs_todo) { #- close what requires this property, but check with selected package requiring old properties. @@ -580,11 +581,6 @@ sub resolve_rejected_ { }); } } - } else { - #- the package has already been rejected. - #- but do update {closure} and {required}, {obsoleted} - set_rejected($state, $pkg, %options); - } } # see resolve_requested__no_suggests below for information about usage -- cgit v1.2.1