diff options
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rwxr-xr-x | Rpmdrake/pkg.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index eed64ba0..087c200e 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -245,8 +245,8 @@ sub open_urpmi_db() { my $media = ref $::options{media} ? join(',', @{$::options{media}}) : ''; urpm::media::configure($urpm, media => $media); # urpmi only support one search media, hance we'll only support "Main backport": - my $searchmedia = (grep { $_->{ignore} && $_->{name} =~ /backport/i } @{$urpm->{media}})[0]->{name}; - urpm::media::configure($urpm, media => $media, searchmedia => $searchmedia); + my ($searchmedia) = grep { $_->{ignore} && $_->{name} =~ /backport/i } @{$urpm->{media}}; + urpm::media::configure($urpm, media => $media, if_($searchmedia, searchmedia => $searchmedia->{name})); if ($error_happened) { touch('/etc/urpmi/urpmi.cfg'); exec('edit-urpm-sources.pl'); |