diff options
author | Francois Pons <fpons@mandriva.com> | 2002-10-16 13:50:57 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-10-16 13:50:57 +0000 |
commit | b33b1f424ab140d710e512c4343dd435ce3e2917 (patch) | |
tree | ba56fec958d837e4f00686bcb5a9f84718d1232b | |
parent | f885c2a6a671254bf74f71267c686476fac338ac (diff) | |
download | urpmi-b33b1f424ab140d710e512c4343dd435ce3e2917.tar urpmi-b33b1f424ab140d710e512c4343dd435ce3e2917.tar.gz urpmi-b33b1f424ab140d710e512c4343dd435ce3e2917.tar.bz2 urpmi-b33b1f424ab140d710e512c4343dd435ce3e2917.tar.xz urpmi-b33b1f424ab140d710e512c4343dd435ce3e2917.zip |
fixed use_provides option given to search_packages not always taken into account.
-rw-r--r-- | urpm.pm | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -1539,19 +1539,20 @@ sub search_packages { foreach my $v (@$names) { my $qv = quotemeta $v; - if ($options{use_provides}) { - unless ($options{fuzzy}) { - #- try to search through provides. - if (my @l = grep { defined $_ } map { $_ && ($options{src} ? $_->arch eq 'src' : $_->is_arch_compat) ? - $_->id : undef } map { $urpm->{depslist}[$_] } - keys %{$urpm->{provides}{$v} || {}}) { - #- we assume that if the there is at least one package providing the resource exactly, - #- this should be the best ones that is described. - $exact{$v} = join '|', @l; - next; - } + unless ($options{fuzzy}) { + #- try to search through provides. + if (my @l = grep { defined $_ } map { $_ && ($options{src} ? $_->arch eq 'src' : $_->is_arch_compat) && + ($options{use_provides} || $_->name eq $v) ? + $_->id : undef } map { $urpm->{depslist}[$_] } + keys %{$urpm->{provides}{$v} || {}}) { + #- we assume that if the there is at least one package providing the resource exactly, + #- this should be the best ones that is described. + $exact{$v} = join '|', @l; + next; } + } + if ($options{use_provides}) { foreach (keys %{$urpm->{provides}}) { #- search through provides to find if a provide match this one. #- but manages choices correctly (as a provides may be virtual or |