diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-07 19:45:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-07 19:45:22 +0000 |
commit | b133dbab8b7509a38a2bba61a5ab5c9072143ebb (patch) | |
tree | 7a7ab2115151740db5a49a3c26a9b8876a2d3c7e /URPM | |
parent | 3b8810aa6559844b1f83e2c8965f591146ffc777 (diff) | |
download | perl-URPM-b133dbab8b7509a38a2bba61a5ab5c9072143ebb.tar perl-URPM-b133dbab8b7509a38a2bba61a5ab5c9072143ebb.tar.gz perl-URPM-b133dbab8b7509a38a2bba61a5ab5c9072143ebb.tar.bz2 perl-URPM-b133dbab8b7509a38a2bba61a5ab5c9072143ebb.tar.xz perl-URPM-b133dbab8b7509a38a2bba61a5ab5c9072143ebb.zip |
make it more clear
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Resolve.pm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 877d77e..8f49543 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -234,13 +234,13 @@ sub unsatisfied_requires { #- all requires should be satisfied according to selected packages or installed packages, #- or the package itself. REQUIRES: foreach my $dep ($pkg->requires) { - if (my ($n, $s) = $dep =~ /^([^\s\[]*)(?:\[\*\])?\[?([^\s\]]*\s*[^\s\]]*)/) { - #- allow filtering on a given name (to speed up some search). - ! defined $options{name} || $n eq $options{name} or next REQUIRES; + my ($n, $s) = $dep =~ /^([^\s\[]*)(?:\[\*\])?\[?([^\s\]]*\s*[^\s\]]*)/ or next; + if (defined $options{name} && $n ne $options{name}) { + #- allow filtering on a given name (to speed up some search). + } elsif (exists $properties{$dep}) { #- avoid recomputing the same all the time. - exists $properties{$dep} and next REQUIRES; - + } else { #- check for installed packages in the installed cache. foreach (keys %{$state->{cached_installed}{$n} || {}}) { exists $state->{rejected}{$_} and next; @@ -248,8 +248,7 @@ sub unsatisfied_requires { } #- check on the selected package if a provide is satisfying the resolution (need to do the ops). - foreach (keys %{$urpm->{provides}{$n} || {}}) { - exists $state->{selected}{$_} or next; + foreach (grep { exists $state->{selected}{$_} } keys %{$urpm->{provides}{$n} || {}}) { my $p = $urpm->{depslist}[$_]; !$urpm->{provides}{$n}{$_} || $p->provides_overlap($dep, 1) and next REQUIRES; } |