summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-10 08:56:49 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-10 08:56:49 +0000
commit6de228ca09ca131223dc9c5c418b24bd5b2c8090 (patch)
treeaa9e5caa20bb6299464ee04c7e7102852343699d /perl-install
parent060f701de71b32f2a935dcc3737f233b63a11edf (diff)
downloaddrakx-6de228ca09ca131223dc9c5c418b24bd5b2c8090.tar
drakx-6de228ca09ca131223dc9c5c418b24bd5b2c8090.tar.gz
drakx-6de228ca09ca131223dc9c5c418b24bd5b2c8090.tar.bz2
drakx-6de228ca09ca131223dc9c5c418b24bd5b2c8090.tar.xz
drakx-6de228ca09ca131223dc9c5c418b24bd5b2c8090.zip
URLPREFIX is not set if the main media isn't http, so the prefix must be
passed manually.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm6
-rw-r--r--perl-install/pkgs.pm4
2 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index c472aa152..751551a0e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -144,7 +144,7 @@ sub errorOpeningFile($) {
$file eq 'XXX' and return; #- special case to force closing file after rpmlib transaction.
$current_medium eq $asked_medium and log::l("errorOpeningFile $file"), return; #- nothing to do in such case.
$::o->{packages}{mediums}{$asked_medium}{selected} or return; #- not selected means no need for worying about.
- my $current_method = $::o->{packages}{medium}{$asked_medium}{method} || $::o->{method};
+ my $current_method = $::o->{packages}{mediums}{$asked_medium}{method} || $::o->{method};
my $max = 32; #- always refuse after $max tries.
if ($current_method eq "cdrom") {
@@ -186,7 +186,7 @@ sub errorOpeningFile($) {
sub getFile {
my ($f, $o_method, $o_altroot) = @_;
my $current_method = $o_method eq 'local' ? ''
- : (($asked_medium ? $::o->{packages}{medium}{$asked_medium}{method} : '') || $::o->{method});
+ : (($asked_medium ? $::o->{packages}{mediums}{$asked_medium}{method} : '') || $::o->{method});
log::l("getFile $f:$o_method ($asked_medium:$current_method)");
my $rel = relGetFile($f);
do {
@@ -201,7 +201,7 @@ sub getFile {
ftp::getFile($rel);
} elsif ($current_method eq "http") {
require http;
- http::getFile("$ENV{URLPREFIX}/$rel");
+ http::getFile(($ENV{URLPREFIX} || $o_altroot) . "/$rel");
} else {
#- try to open the file, but examine if it is present in the repository,
#- this allows handling changing a media when some of the files on the
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 2fb31c834..d880912a0 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -416,7 +416,7 @@ sub psUsingHdlist {
my $urpmidir = urpmidir($prefix);
log::l("trying to read $hdlist for medium $medium_name");
- #- if the medium already exist, use it.
+ #- if the medium already exists, use it.
$packages->{mediums}{$medium_name} and return $packages->{mediums}{$medium_name};
my $m = { hdlist => $hdlist,
@@ -1118,7 +1118,7 @@ sub install($$$;$$) {
#- supplementary CD already mounted in /mnt/cdrom
$fd = install_any::getFile($f, $medium->{descr}, '/mnt/cdrom');
} else {
- $fd = install_any::getFile($f, $medium->{descr});
+ $fd = install_any::getFile($f, $medium->{descr}, $medium->{prefix});
}
$fd ? fileno $fd : -1;
}, callback_close => sub {