diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-02-17 17:22:39 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-02-17 17:22:39 +0000 |
commit | c2d9450831e9c4e57d17baed6679acc4c3446f78 (patch) | |
tree | bff224c61cbd48f0660076cf7b07584a994b376e | |
parent | 84af202ce156529c02d7f8d0feed032c65d63d9d (diff) | |
download | rpmdrake-c2d9450831e9c4e57d17baed6679acc4c3446f78.tar rpmdrake-c2d9450831e9c4e57d17baed6679acc4c3446f78.tar.gz rpmdrake-c2d9450831e9c4e57d17baed6679acc4c3446f78.tar.bz2 rpmdrake-c2d9450831e9c4e57d17baed6679acc4c3446f78.tar.xz rpmdrake-c2d9450831e9c4e57d17baed6679acc4c3446f78.zip |
(do_search) only sort packages once
-rwxr-xr-x | rpmdrake | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -199,14 +199,15 @@ sub do_search($$$$$$$) { my ($x64, $other) = partition { !/86$/ } @_; (sort { uc($a) cmp uc($b) } @$x64), sort { uc($a) cmp uc($b) } @$other; } : sub { sort { uc($a) cmp uc($b) } @_ }; - $elems{$results_ok} = [ map { [ $_, $results_ok ] } $f->(@search_results) ]; + @search_results = $f->(@search_results); + $elems{$results_ok} = [ map { [ $_, $results_ok ] } @search_results ]; $iter = $options->{add_parent}->($results_ok); $options->{add_nodes}->(map { [ $_, $results_ok . ($options->{tree_mode} eq 'by_presence' ? '|' . ($pkgs->{$_}{pkg}->flag_installed ? N("Upgradable") : N("Addable")) : ($options->{tree_mode} eq 'by_selection' ? '|' . ($pkgs->{$_}{selected} ? N("Selected") : N("Not selected")) : '')) - ] } $f->(@search_results)); + ] } @search_results); } else { $iter = $options->{add_parent}->($results_none); # clear package list: |