summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-29 16:45:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-29 16:45:26 +0000
commit9063a6cc6258bc6834b45f0fefe1fcad335931cb (patch)
tree5edd16b2a83ccc774244a9f5ca004717d369931f /urpm/media.pm
parent153ae8e46c5ee905c6bea275ef665c07456b209c (diff)
downloadurpmi-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
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm7
1 files changed, 6 insertions, 1 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 {