summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-26 20:28:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-26 20:28:52 +0000
commita7080d2dd762973e4fd32a5378f335c264f4681f (patch)
treee82e62c3b28b7e84d63b3c2ca3f0810ff7f8253e
parent3b772a98b249e4c91663fbdea220c98ecaeb25af (diff)
downloadurpmi-a7080d2dd762973e4fd32a5378f335c264f4681f.tar
urpmi-a7080d2dd762973e4fd32a5378f335c264f4681f.tar.gz
urpmi-a7080d2dd762973e4fd32a5378f335c264f4681f.tar.bz2
urpmi-a7080d2dd762973e4fd32a5378f335c264f4681f.tar.xz
urpmi-a7080d2dd762973e4fd32a5378f335c264f4681f.zip
do not pass $device around, it's the same as $medium->{removable}
-rw-r--r--urpm/removable.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/urpm/removable.pm b/urpm/removable.pm
index 56463110..24a56538 100644
--- a/urpm/removable.pm
+++ b/urpm/removable.pm
@@ -101,12 +101,12 @@ sub _check_notfound {
#- removable media have to be examined to keep mounted the one that has
#- more packages than others.
sub _examine_removable_medium {
- my ($urpm, $blist, $sources, $device, $o_ask_for_medium) = @_;
+ my ($urpm, $blist, $sources, $o_ask_for_medium) = @_;
my $medium = $blist->{medium};
if (file_from_local_url($medium->{url})) {
- _examine_removable_medium_($urpm, $medium, $blist->{list}, $sources, $device, $o_ask_for_medium);
+ _examine_removable_medium_($urpm, $medium, $blist->{list}, $sources, $o_ask_for_medium);
} else {
#- we have a removable device that is not removable, well...
$urpm->{error}(N("inconsistent medium \"%s\" marked removable but not really", $medium->{name}));
@@ -114,8 +114,9 @@ sub _examine_removable_medium {
}
sub _mount_it {
- my ($urpm, $medium, $medium_list, $device, $o_ask_for_medium) = @_;
+ my ($urpm, $medium, $medium_list, $o_ask_for_medium) = @_;
+ my $device = $medium->{removable};
my $dir = file_from_local_url($medium->{url});
#- the directory given does not exist and may be accessible
@@ -142,9 +143,9 @@ sub _filepath {
}
sub _examine_removable_medium_ {
- my ($urpm, $medium, $medium_list, $sources, $device, $o_ask_for_medium) = @_;
+ my ($urpm, $medium, $medium_list, $sources, $o_ask_for_medium) = @_;
- _mount_it($urpm, $medium, $medium_list, $device, $o_ask_for_medium);
+ _mount_it($urpm, $medium, $medium_list, $o_ask_for_medium);
my $dir = file_from_local_url($medium->{url});
@@ -230,7 +231,7 @@ sub copy_packages_of_removable_media {
}
}
foreach my $blist (@l) {
- _examine_removable_medium($urpm, $blist, $sources, $device, $o_ask_for_medium);
+ _examine_removable_medium($urpm, $blist, $sources, $o_ask_for_medium);
}
}