summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-21 18:10:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-21 18:10:03 +0000
commit106088ec7089a961767fb19d83e9dc09ae02e076 (patch)
tree52a07da482a9b22c66e3c7964dcc80a4af35dd81 /urpm/media.pm
parent3519a709524f3c8b4ea550838bcb863fe7e4a2c0 (diff)
downloadurpmi-106088ec7089a961767fb19d83e9dc09ae02e076.tar
urpmi-106088ec7089a961767fb19d83e9dc09ae02e076.tar.gz
urpmi-106088ec7089a961767fb19d83e9dc09ae02e076.tar.bz2
urpmi-106088ec7089a961767fb19d83e9dc09ae02e076.tar.xz
urpmi-106088ec7089a961767fb19d83e9dc09ae02e076.zip
create urpm::removable out of urpm.pm
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index e32ae406..c823a8d5 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -5,6 +5,7 @@ package urpm::media;
use urpm 'file_from_local_url';
use urpm::msg;
use urpm::util;
+use urpm::removable;
our @PER_MEDIA_OPT = qw(
@@ -334,7 +335,7 @@ sub probe_removable_device {
$urpm->{log}(N("too many mount points for removable medium \"%s\"", $medium->{name}));
$urpm->{log}(N("taking removable device as \"%s\"", join ',', map { $infos{$_}{device} } @mntpoints));
}
- if (urpm::is_iso($medium->{removable})) {
+ if (urpm::removable::is_iso($medium->{removable})) {
$urpm->{log}(N("Medium \"%s\" is an ISO image, will be mounted on-the-fly", $medium->{name}));
} elsif (@mntpoints) {
if ($medium->{removable} && $medium->{removable} ne $infos{$mntpoints[-1]}{device}) {
@@ -663,7 +664,7 @@ sub add_distrib_media {
my $distribconf;
if (my $dir = file_from_local_url($url)) {
- $urpm->try_mounting($dir)
+ urpm::removable::try_mounting($urpm, $dir)
or $urpm->{error}(N("unable to mount the distribution medium")), return ();
$distribconf = MDV::Distribconf->new($dir, undef);
$distribconf->load
@@ -1272,11 +1273,11 @@ sub _update_medium__parse_if_unmodified__local {
#- the directory given does not exist and may be accessible
#- by mounting some other directory. Try to figure it out and mount
#- everything that might be necessary.
- $urpm->try_mounting(
+ urpm::removable::try_mounting($urpm,
!$options->{force_building_hdlist} && $medium->{with_hdlist}
? _hdlist_dir($medium) : $dir,
#- in case of an iso image, pass its name
- urpm::is_iso($medium->{removable}) && $medium->{removable},
+ urpm::removable::is_iso($medium->{removable}) && $medium->{removable},
) or $urpm->{error}(N("unable to access medium \"%s\",
this could happen if you mounted manually the directory when creating the medium.", $medium->{name})), return 'unmodified';
}