diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-26 21:17:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-26 21:17:28 +0000 |
commit | 789271f043122341ea66835c954e71f65f97a582 (patch) | |
tree | 25b3643ad4167db4f153d8933d5c252f48827882 /urpm | |
parent | 2a5ffabe87c528f604c961635fe442b19b20fe30 (diff) | |
download | urpmi-789271f043122341ea66835c954e71f65f97a582.tar urpmi-789271f043122341ea66835c954e71f65f97a582.tar.gz urpmi-789271f043122341ea66835c954e71f65f97a582.tar.bz2 urpmi-789271f043122341ea66835c954e71f65f97a582.tar.xz urpmi-789271f043122341ea66835c954e71f65f97a582.zip |
- re-indent
- do not call eject on isos
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/removable.pm | 29 |
1 files changed, 17 insertions, 12 deletions
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 { |