aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-02-17 17:22:39 +0000
committerThierry Vignaud <tv@mageia.org>2012-02-17 17:22:39 +0000
commitc2d9450831e9c4e57d17baed6679acc4c3446f78 (patch)
treebff224c61cbd48f0660076cf7b07584a994b376e
parent84af202ce156529c02d7f8d0feed032c65d63d9d (diff)
downloadrpmdrake-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-xrpmdrake5
1 files changed, 3 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index 1166425c..256ad840 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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: