aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: