diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-29 16:45:26 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-29 16:45:26 +0000 |
commit | 9063a6cc6258bc6834b45f0fefe1fcad335931cb (patch) | |
tree | 5edd16b2a83ccc774244a9f5ca004717d369931f | |
parent | 153ae8e46c5ee905c6bea275ef665c07456b209c (diff) | |
download | urpmi-9063a6cc6258bc6834b45f0fefe1fcad335931cb.tar urpmi-9063a6cc6258bc6834b45f0fefe1fcad335931cb.tar.gz urpmi-9063a6cc6258bc6834b45f0fefe1fcad335931cb.tar.bz2 urpmi-9063a6cc6258bc6834b45f0fefe1fcad335931cb.tar.xz urpmi-9063a6cc6258bc6834b45f0fefe1fcad335931cb.zip |
move is_iso to urpm::media and rename it
-rw-r--r-- | urpm/media.pm | 7 | ||||
-rw-r--r-- | urpm/removable.pm | 8 |
2 files changed, 6 insertions, 9 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index 959b44dd..2862351e 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -42,6 +42,11 @@ sub get_medium_option { defined $medium->{$option_name} ? $medium->{$option_name} : $urpm->{options}{$option_name}; } +sub _is_iso { + my ($removable_dev) = @_; + $removable_dev && $removable_dev =~ /\.iso$/i; +} + sub only_media_opts { my ($m) = @_; my %m = map { $_ => $m->{$_} } grep { defined $m->{$_} } @PER_MEDIA_OPT; @@ -51,7 +56,7 @@ sub _only_media_opts_read { my ($m) = @_; my $c = only_media_opts($m); $c->{media_info_dir} ||= 'media_info'; - $c->{iso} = delete $c->{removable} if $c->{removable} && urpm::removable::is_iso($c->{removable}); + $c->{iso} = delete $c->{removable} if $c->{removable} && _is_iso($c->{removable}); $c; } sub _only_media_opts_write { diff --git a/urpm/removable.pm b/urpm/removable.pm index 301aa59f..c6e1bf29 100644 --- a/urpm/removable.pm +++ b/urpm/removable.pm @@ -9,14 +9,6 @@ use urpm 'file_from_local_medium'; -#- returns the removable device name if it corresponds to an iso image, '' otherwise -#- -#- side-effects: none -sub is_iso { - my ($removable_dev) = @_; - $removable_dev && $removable_dev =~ /\.iso$/i; -} - sub _file_or_synthesis_dir { my ($medium, $o_url) = @_; |