diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-27 10:53:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-27 10:53:14 +0000 |
commit | a37ac4885675defbdac79ed451105fce7eacfa85 (patch) | |
tree | 0b3f2b2abb9056b7371b7613104cb9591513408c | |
parent | fa9c6fa00bffb310d3358a8ea63c6566acf924e9 (diff) | |
download | urpmi-a37ac4885675defbdac79ed451105fce7eacfa85.tar urpmi-a37ac4885675defbdac79ed451105fce7eacfa85.tar.gz urpmi-a37ac4885675defbdac79ed451105fce7eacfa85.tar.bz2 urpmi-a37ac4885675defbdac79ed451105fce7eacfa85.tar.xz urpmi-a37ac4885675defbdac79ed451105fce7eacfa85.zip |
rename try_mounting_non_removable() into try_mounting_non_removables()
and create try_mounting_non_removable()
-rw-r--r-- | urpm/main_loop.pm | 2 | ||||
-rw-r--r-- | urpm/removable.pm | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index 129a597a..b4dbff7c 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -51,7 +51,7 @@ unless ($local_sources || $list) { my %sources = %$local_sources; my %error_sources; -urpm::removable::try_mounting_non_removable($urpm, $list); +urpm::removable::try_mounting_non_removables($urpm, $list); $callbacks->{pre_removable} and $callbacks->{pre_removable}->(); urpm::removable::copy_packages_of_removable_media($urpm, diff --git a/urpm/removable.pm b/urpm/removable.pm index 71e8c0ff..411d720d 100644 --- a/urpm/removable.pm +++ b/urpm/removable.pm @@ -216,18 +216,26 @@ sub _examine_removable_medium_ { } #- side-effects: -#- + those of try_mounting_ ($urpm->{removable_mounted}, "mount") -sub try_mounting_non_removable { +#- + those of try_mounting_non_removable ($urpm->{removable_mounted}, "mount") +sub try_mounting_non_removables { my ($urpm, $list) = @_; my @used_media = map { $_->{medium} } _create_blists($urpm->{media}, $list); foreach my $medium (grep { !$_->{removable} } @used_media) { + try_mounting_non_removable($urpm, $medium); + } +} + +#- side-effects: +#- + those of try_mounting_ ($urpm->{removable_mounted}, "mount") +sub try_mounting_non_removable { + my ($urpm, $medium) = @_; + my $dir = file_from_local_url($medium->{url}) or next; -e $dir || try_mounting_($urpm, $dir) or $urpm->{error}(N("unable to access medium \"%s\"", $medium->{name})), next; - } } #- side-effects: none |