summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-26 22:46:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-26 22:46:43 +0000
commitd6b6da9a28ddcbee6c31615d6a7df6a58abddee6 (patch)
treebeba1eaa6dab9e981483258209d91f7d14c28a54 /urpm
parent15309d73c0ca04eb361ce44a8d0ca9d913c3bcef (diff)
downloadurpmi-d6b6da9a28ddcbee6c31615d6a7df6a58abddee6.tar
urpmi-d6b6da9a28ddcbee6c31615d6a7df6a58abddee6.tar.gz
urpmi-d6b6da9a28ddcbee6c31615d6a7df6a58abddee6.tar.bz2
urpmi-d6b6da9a28ddcbee6c31615d6a7df6a58abddee6.tar.xz
urpmi-d6b6da9a28ddcbee6c31615d6a7df6a58abddee6.zip
there is no reason copy_packages_of_removable_media should mount non removable
media
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.