summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-26 19:43:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-26 19:43:07 +0000
commit21716fdd4df2d5dfc6bacadf116f9ffcea8f2dfa (patch)
treeb6d0f1e719ccd04300fe3d7b5015cfe6029d66b1
parentb03d4fcb233f2a7783af2d9ad6c85e16e7d7403b (diff)
downloadurpmi-21716fdd4df2d5dfc6bacadf116f9ffcea8f2dfa.tar
urpmi-21716fdd4df2d5dfc6bacadf116f9ffcea8f2dfa.tar.gz
urpmi-21716fdd4df2d5dfc6bacadf116f9ffcea8f2dfa.tar.bz2
urpmi-21716fdd4df2d5dfc6bacadf116f9ffcea8f2dfa.tar.xz
urpmi-21716fdd4df2d5dfc6bacadf116f9ffcea8f2dfa.zip
change _check_notfound() parameter
-rw-r--r--urpm/removable.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/urpm/removable.pm b/urpm/removable.pm
index 0298e083..111e36fa 100644
--- a/urpm/removable.pm
+++ b/urpm/removable.pm
@@ -81,12 +81,12 @@ sub try_umounting_removables {
#- side-effects:
#- + those of try_mounting ($urpm->{removable_mounted}, mount)
sub _check_notfound {
- my ($urpm, $list, $id, $dir, $removable) = @_;
+ my ($urpm, $medium_list, $dir, $removable) = @_;
if ($dir) {
try_mounting($urpm, $dir, $removable);
-e $dir or return 2;
}
- foreach (values %{$list->[$id]}) {
+ foreach (values %$medium_list) {
chomp;
my $dir_ = file_from_local_url($_) or next;
$dir_ =~ m!/.*/! or next; #- is this really needed??
@@ -109,7 +109,7 @@ sub _examine_removable_medium {
#- 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, $list, $id, $dir, is_iso($medium->{removable}) ? $medium->{removable} : 'removable')) {
+ while (_check_notfound($urpm, $list->[$id], $dir, is_iso($medium->{removable}) ? $medium->{removable} : '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);
@@ -193,7 +193,7 @@ sub copy_packages_of_removable_media {
my @sorted_media = sort { values(%{$list->[$a]}) <=> values(%{$list->[$b]}) } @{$removables{$device}};
#- check if a removable device is already mounted (and files present).
- if (my ($already_mounted_medium) = grep { !_check_notfound($urpm, $list, $_) } @sorted_media) {
+ if (my ($already_mounted_medium) = grep { !_check_notfound($urpm, $list->[$_]) } @sorted_media) {
@sorted_media = ($already_mounted_medium,
grep { $_ ne $already_mounted_medium } @sorted_media);
}