From 3ea076a136b24834dae021af82de078d150f0445 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 13 Dec 2012 10:42:53 +0000 Subject: (media_screen) merge grep into map (needed for next commit) --- perl-install/install/any.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl-install/install/any.pm') diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 89e6c03fe..82aaad4c9 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -369,16 +369,15 @@ sub media_screen { my $medium = $_; $medium->{temp_enabled} = !$medium->{ignore}; my $name = $medium->{name}; + my ($distribconf, $medium_path) = @{$_->{mediacfg}}; + my @media_types = split(':', $distribconf->getvalue($medium_path, 'media_type')); + intersection(\@media_types, [ qw(backports debug source testing) ]) ? () : +{ val => \$medium->{temp_enabled}, type => 'bool', text => $name, help => $descriptions{$name}, # 'Core Release' cannot be unselected: disabled => sub { $name eq 'Core Release' }, }; - } grep { - my ($distribconf, $medium_path) = @{$_->{mediacfg}}; - my @media_types = split(':', $distribconf->getvalue($medium_path, 'media_type')); - !intersection(\@media_types, [ qw(backports debug source testing) ]); } @{$urpm->{media}}, ]); -- cgit v1.2.1