aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-02-15 19:31:42 +0000
committerThierry Vignaud <tv@mageia.org>2012-02-15 19:31:42 +0000
commit520cfc51b9d5424012263df9322d94415c9741c4 (patch)
treeaab663f3b06125b2b94d91845d3d3e4a6ffac5e6
parent118592670df1f2650e4cc788ca29e8429fb11353 (diff)
downloadrpmdrake-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--NEWS1
-rwxr-xr-xrpmdrake8
2 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index a796ddcf..be88704b 100644
--- a/NEWS
+++ b/NEWS
@@ -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
diff --git a/rpmdrake b/rpmdrake
index 35864955..1166425c 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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: