diff options
Diffstat (limited to 'perl-install/install/media.pm')
-rw-r--r-- | perl-install/install/media.pm | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm index ebbf99665..9d75ea24f 100644 --- a/perl-install/install/media.pm +++ b/perl-install/install/media.pm @@ -1,4 +1,4 @@ -package install::media; # $Id: media.pm 269998 2010-06-11 17:28:57Z blino $ +package install::media; use strict; @@ -42,11 +42,6 @@ use urpm::media; our $postinstall_rpms = ''; my %mounted_media; -sub _free_medium_id { - my ($media) = @_; - int(@$media); -} - sub allMediums { my ($packages) = @_; @@ -172,7 +167,7 @@ sub stage2_phys_medium { my $user = $ENV{LOGIN} && ($ENV{LOGIN} . ($ENV{PASSWORD} && ":$ENV{PASSWORD}") . '@'); $ENV{URLPREFIX} = "ftp://$user$ENV{HOST}/$ENV{PREFIX}"; } - if ($method eq 'http' || $method eq 'ftp') { + if (member($method, qw(http ftp))) { { method => $method, url => $ENV{URLPREFIX} }; } elsif ($method =~ /(.*)-iso$/) { my $dir_method = $1; @@ -433,15 +428,6 @@ sub urpmidir() { -w $v ? $v : '/tmp'; } -sub hdlist_on_disk { - my ($m) = @_; - - #urpmidir() . "/hdlist.$m->{fakemedium}.cz"; - require urpm; - # FIXME: download hdlist if needed: - return urpm::is_local_medium($m) ? join('/', $m->{url}, $m->{media_info_dir}, "hdlist.cz") : ''; -} - sub _allow_copy_rpms_on_disk { my ($medium, $hdlists) = @_; @@ -848,7 +834,7 @@ sub copy_rpms_on_disk { sub _get_medium_dir { my ($phys_m) = @_; - if ($phys_m->{method} eq 'ftp' || $phys_m->{method} eq 'http' || $phys_m->{method} eq 'cdrom') { + if (member($phys_m->{method}, qw(ftp http cdrom))) { $phys_m->{url}; } else { "$phys_m->{mntpoint}$phys_m->{rel_path}"; |