summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-11 08:39:24 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-11 08:39:24 +0000
commit6df0c756db22508ebefa18b5a96829a93ccdd08e (patch)
treecd6a676a85128d1ca6671928e894d5fffe90d8e1 /perl-install
parent3cf3819524fda0832bea5ae037f6fa6ca9f63804 (diff)
downloaddrakx-backup-do-not-use-6df0c756db22508ebefa18b5a96829a93ccdd08e.tar
drakx-backup-do-not-use-6df0c756db22508ebefa18b5a96829a93ccdd08e.tar.gz
drakx-backup-do-not-use-6df0c756db22508ebefa18b5a96829a93ccdd08e.tar.bz2
drakx-backup-do-not-use-6df0c756db22508ebefa18b5a96829a93ccdd08e.tar.xz
drakx-backup-do-not-use-6df0c756db22508ebefa18b5a96829a93ccdd08e.zip
Fix http installs.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index c7805f761..47f19e010 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -185,8 +185,7 @@ sub errorOpeningFile($) {
}
sub getFile {
my ($f, $o_method, $o_altroot) = @_;
- my $current_method = $o_method eq 'local' ? ''
- : (($asked_medium ? $::o->{packages}{mediums}{$asked_medium}{method} : '') || $::o->{method});
+ my $current_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 {
@@ -217,7 +216,7 @@ sub getFile {
sub getAndSaveFile {
my ($file, $local) = @_ == 1 ? ("install/stage2/live$_[0]", $_[0]) : @_;
local $/ = \ (16 * 1024);
- my $f = ref($file) ? $file : getFile($file, 'local') or return;
+ my $f = ref($file) ? $file : getFile($file) or return;
open(my $F, ">$local") or log::l("getAndSaveFile(opening $local): $!"), return;
local $_;
while (<$f>) { syswrite($F, $_) or die("getAndSaveFile($local): $!") }