summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/main_loop.pm2
-rw-r--r--urpm/removable.pm9
2 files changed, 5 insertions, 6 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index 506b2d94..73d53c61 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -51,6 +51,8 @@ unless ($local_sources || $list) {
my %sources = %$local_sources;
my %error_sources;
+urpm::removable::try_mounting_non_removable($urpm);
+
$callbacks->{pre_removable} and $callbacks->{pre_removable}->();
urpm::removable::copy_packages_of_removable_media($urpm,
$list, \%sources,
diff --git a/urpm/removable.pm b/urpm/removable.pm
index d8c981e6..582efd74 100644
--- a/urpm/removable.pm
+++ b/urpm/removable.pm
@@ -205,10 +205,10 @@ sub _examine_removable_medium_ {
#- side-effects:
#- + those of try_mounting ($urpm->{removable_mounted}, "mount")
-sub _try_mounting_non_removable {
- my ($urpm, $media) = @_;
+sub try_mounting_non_removable {
+ my ($urpm) = @_;
- foreach my $medium (grep { !$_->{removable} } @$media) {
+ foreach my $medium (grep { !$_->{removable} } @{$urpm->{media}}) {
my $dir = file_from_local_url($medium->{url}) or next;
-e $dir || try_mounting($urpm, $dir) or
@@ -264,15 +264,12 @@ sub _sort_media {
#- where there is one hash for each medium in {media}
#-
#- side-effects:
-#- + those of _try_mounting_non_removable ($urpm->{removable_mounted}, "mount")
#- + those of _examine_removable_medium ($urpm->{removable_mounted}, $sources, "mount", "umount", "eject", "copy-move-files")
sub copy_packages_of_removable_media {
my ($urpm, $list, $sources, $o_ask_for_medium) = @_;
my $blists = _create_blists($urpm->{media}, $list);
- _try_mounting_non_removable($urpm, $urpm->{media});
-
foreach my $l (_get_removables($blists)) {
#- Here we have only removable devices.