summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-19 16:51:54 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-19 16:51:54 +0000
commit1a6e5b727d651158669d405075b8069a2fbe42d9 (patch)
treed8c2bf5d7016cc4079063cf89cf8013e9b1e141d /perl-install
parent14977dfca93c0be0e62bb2a29edb07317efb808d (diff)
downloaddrakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar.gz
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar.bz2
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar.xz
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.zip
sort channels list
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rwxr-xr-xperl-install/standalone/drakdvb5
2 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 843fb6835..b8390f565 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -2,6 +2,8 @@
o do not crash b/c ext4 was forbidden for /boot (#47853)
- diskdrake
o really don't set extents option for ext4
+- drakdvb:
+ o sort channels list
Version 11.88 - 16 February 2009
diff --git a/perl-install/standalone/drakdvb b/perl-install/standalone/drakdvb
index b4f1e2010..222dfd51e 100755
--- a/perl-install/standalone/drakdvb
+++ b/perl-install/standalone/drakdvb
@@ -94,16 +94,17 @@ sub detect_channels() {
}
sub load_channels() {
- @{$channel_list->{data}} = ();
+ my @channels;
open(my $CHANNELCONF, "<$config_file");
local $_;
while (<$CHANNELCONF>) {
my $line = $_;
if ($line =~ /^([^:]*?)(\([^(:]*\))?:/) {
- push @{$channel_list->{data}}, [ $1, $1 . $2 ];
+ push @channels, [ $1, $1 . $2 ];
}
}
close($CHANNELCONF);
+ @{$channel_list->{data}} = sort { $a->[0] cmp $b->[0] } @channels;
if (defined @{$channel_list->{data}}[0]) {
$channel_list->select(0);
}