diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-02-15 19:31:42 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-02-15 19:31:42 +0000 |
commit | 520cfc51b9d5424012263df9322d94415c9741c4 (patch) | |
tree | aab663f3b06125b2b94d91845d3d3e4a6ffac5e6 | |
parent | 118592670df1f2650e4cc788ca29e8429fb11353 (diff) | |
download | rpmdrake-520cfc51b9d5424012263df9322d94415c9741c4.tar rpmdrake-520cfc51b9d5424012263df9322d94415c9741c4.tar.gz rpmdrake-520cfc51b9d5424012263df9322d94415c9741c4.tar.bz2 rpmdrake-520cfc51b9d5424012263df9322d94415c9741c4.tar.xz rpmdrake-520cfc51b9d5424012263df9322d94415c9741c4.zip |
(do_search) show 32bit packages last in searches on 64bit (mga#1261)
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | rpmdrake | 8 |
2 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,6 @@ - fix french translation (mga#1523) - limit progress bar refreshes to 3 per second max (mga#2775) +- show 32bit packages last in searches on 64bit (mga#1261) Version 5.27 - 10 December 2011, Thierry Vignaud @@ -195,14 +195,18 @@ sub do_search($$$$$$$) { my $iter; if (@search_results) { - $elems{$results_ok} = [ map { [ $_, $results_ok ] } sort { uc($a) cmp uc($b) } @search_results ]; + my $f = arch() =~ /x86_64/ ? sub { + 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) ]; $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")) : '')) - ] } sort { uc($a) cmp uc($b) } @search_results); + ] } $f->(@search_results)); } else { $iter = $options->{add_parent}->($results_none); # clear package list: |