summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install/NEWS3
-rw-r--r--perl-install/services.pm7
2 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 1deb906d5..ffd13636e 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- summary:
+ o sort service categories, putting "Other" at end (mga#6286)
+
Version 17.43 - 22 June 2016
- summary:
diff --git a/perl-install/services.pm b/perl-install/services.pm
index d80c54558..6ea7d5c2e 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -193,8 +193,13 @@ sub ask_ {
node_state => sub { $services{$_[0]} ? 'selected' : 'unselected' },
build_tree => sub {
my ($add_node, $flat) = @_;
+ # sort existing services by category, putting "Other" at end
+ my @srvs = grep { $services{$_} } map { @{$root_services{$_}} }
+ sort { $a cmp $b } keys %root_services;
+ # put "Others" last:
+ push @srvs, difference2([ keys %services ], \@srvs);
$add_node->($_, !$flat && ($services_root{$_} || N("Other")))
- foreach sort keys %services;
+ foreach @srvs;
},
grep_unselected => sub { grep { !$services{$_} } @_ },
toggle_nodes => sub {