summaryrefslogtreecommitdiffstats
path: root/urpm
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
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')
-rw-r--r--urpm/media.pm7
-rw-r--r--urpm/removable.pm8
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) = @_;