summaryrefslogtreecommitdiffstats
path: root/urpm/removable.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-26 21:17:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-26 21:17:28 +0000
commit789271f043122341ea66835c954e71f65f97a582 (patch)
tree25b3643ad4167db4f153d8933d5c252f48827882 /urpm/removable.pm
parent2a5ffabe87c528f604c961635fe442b19b20fe30 (diff)
downloadurpmi-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/removable.pm')
-rw-r--r--urpm/removable.pm29
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 {