From 789271f043122341ea66835c954e71f65f97a582 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 26 Feb 2008 21:17:28 +0000 Subject: - re-indent - do not call eject on isos --- urpm/removable.pm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'urpm') diff --git a/urpm/removable.pm b/urpm/removable.pm index b4a9af28..9e6e24c7 100644 --- a/urpm/removable.pm +++ b/urpm/removable.pm @@ -125,18 +125,23 @@ sub _mount_it { my $device = $medium->{removable}; my $dir = file_from_local_url($medium->{url}); - #- 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. - while (_check_notfound($urpm, $medium_list, $dir, $medium->{removable})) { - is_iso($medium->{removable}) || $o_ask_for_medium - or $urpm->{fatal}(4, N("medium \"%s\" is not available", $medium->{name})); - try_umounting($urpm, $dir); - system("/usr/bin/eject '$device' 2>/dev/null"); - is_iso($medium->{removable}) - || $o_ask_for_medium->(remove_internal_name($medium->{name}), $medium->{removable}) - or $urpm->{fatal}(4, N("medium \"%s\" is not available", $medium->{name})); - } + #- 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. + while (_check_notfound($urpm, $medium_list, $dir, $medium->{removable})) { + if (is_iso($medium->{removable})) { + try_umounting($urpm, $dir); + } else { + $o_ask_for_medium + or $urpm->{fatal}(4, N("medium \"%s\" is not available", $medium->{name})); + + try_umounting($urpm, $dir); + system("/usr/bin/eject '$device' 2>/dev/null"); + + $o_ask_for_medium->(remove_internal_name($medium->{name}), $medium->{removable}) + or $urpm->{fatal}(4, N("medium \"%s\" is not available", $medium->{name})); + } + } } sub _filepath { -- cgit v1.2.1