summaryrefslogtreecommitdiffstats
path: root/urpm/removable.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 20:19:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 20:19:02 +0000
commitf2697c17543171c3a45e1f913f6cedd13738be86 (patch)
tree519aa2f88b8796dc7a28f14dfff5fac337f33776 /urpm/removable.pm
parent053d9498ae9612c11ac789aa084774bc37225da5 (diff)
downloadurpmi-f2697c17543171c3a45e1f913f6cedd13738be86.tar
urpmi-f2697c17543171c3a45e1f913f6cedd13738be86.tar.gz
urpmi-f2697c17543171c3a45e1f913f6cedd13738be86.tar.bz2
urpmi-f2697c17543171c3a45e1f913f6cedd13738be86.tar.xz
urpmi-f2697c17543171c3a45e1f913f6cedd13738be86.zip
$o_url and blists_url is no more allowed, so adapt
Diffstat (limited to 'urpm/removable.pm')
-rw-r--r--urpm/removable.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/urpm/removable.pm b/urpm/removable.pm
index f4892bc0..f6d97983 100644
--- a/urpm/removable.pm
+++ b/urpm/removable.pm
@@ -26,9 +26,9 @@ sub file_or_synthesis_dir_from_blist {
#- side-effects:
#- + those of try_mounting_medium_ ($medium->{mntpoint})
sub try_mounting_medium {
- my ($urpm, $medium, $o_url) = @_;
+ my ($urpm, $medium, $o_blist) = @_;
- my $rc = try_mounting_medium_($urpm, $medium, $o_url);
+ my $rc = try_mounting_medium_($urpm, $medium, $o_blist);
$rc or $urpm->{error}(N("unable to access medium \"%s\".", $medium->{name}));
$rc;
}
@@ -37,13 +37,13 @@ sub try_mounting_medium {
#- + those of urpm::cdrom::try_mounting_cdrom ($urpm->{cdrom_mounted}, $medium->{mntpoint}, "hal_mount")
#- + those of _try_mounting_local ($urpm->{removable_mounted}, "mount")
sub try_mounting_medium_ {
- my ($urpm, $medium, $o_url) = @_;
+ my ($urpm, $medium, $o_blist) = @_;
if (urpm::is_cdrom_url($medium->{url})) {
require urpm::cdrom;
- urpm::cdrom::try_mounting_cdrom($urpm, [ { medium => $medium, url => $o_url } ]);
+ urpm::cdrom::try_mounting_cdrom($urpm, [ { medium => $medium, pkgs => $o_blist && $o_blist->{pkgs} } ]);
} else {
- _try_mounting_local($urpm, $medium, $o_url);
+ _try_mounting_local($urpm, $medium, $o_blist);
}
}
@@ -51,9 +51,9 @@ sub try_mounting_medium_ {
#- + those of _try_mounting_using_fstab ($urpm->{removable_mounted}, "mount")
#- + those of _try_mounting_iso ($urpm->{removable_mounted}, "mount")
sub _try_mounting_local {
- my ($urpm, $medium, $o_url) = @_;
+ my ($urpm, $medium, $o_blist) = @_;
- my $dir = file_or_synthesis_dir($medium, $o_url);
+ my $dir = file_or_synthesis_dir($medium, $o_blist && _blist_first_url($o_blist));
-e $dir and return 1;
$medium->{iso} ? _try_mounting_iso($urpm, $dir, $medium->{iso}) : _try_mounting_using_fstab($urpm, $dir);
@@ -139,7 +139,7 @@ sub try_mounting_non_cdroms {
my ($urpm, $blists) = @_;
foreach my $blist (grep { urpm::file_from_local_url($_->{medium}{url}) } @$blists) {
- try_mounting_medium($urpm, $blist->{medium}, _blist_first_url($blist));
+ try_mounting_medium($urpm, $blist->{medium}, $blist);
}
}
@@ -147,7 +147,7 @@ sub try_mounting_non_cdroms {
sub _blist_first_url {
my ($blist) = @_;
- my ($pkg) = values %{$blist->{pkgs}};
+ my ($pkg) = values %{$blist->{pkgs}} or return;
urpm::blist_pkg_to_url($blist, $pkg);
}