summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-03-02 15:39:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-03-02 15:39:59 +0000
commit354c739f97605b200be6f0c629ecbd3ed871cd64 (patch)
treeec50f212beb4700648b8ecf46e2c0d335afccafd
parented6552bd88ce132bfcb499afc86a097a23c901cf (diff)
downloaddrakx-354c739f97605b200be6f0c629ecbd3ed871cd64.tar
drakx-354c739f97605b200be6f0c629ecbd3ed871cd64.tar.gz
drakx-354c739f97605b200be6f0c629ecbd3ed871cd64.tar.bz2
drakx-354c739f97605b200be6f0c629ecbd3ed871cd64.tar.xz
drakx-354c739f97605b200be6f0c629ecbd3ed871cd64.zip
cooker updates are not in a per-version directory
-rw-r--r--perl-install/crypto.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index d5326737b..1e858907c 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -57,6 +57,7 @@ sub mirrors {
local $SIG{ALRM} = sub { die "timeout" };
alarm 60;
my $distro_type = $o_distro_type || 'updates';
+ my $sub_dir = $distro_type eq 'cooker' ? '' : ($::corporate ? '/corporate' : '') . '/' . version();
foreach (<$f>) {
my ($arch, $url, $dir) = m|$distro_type([^:]*):ftp://([^/]*)(/\S*)| or next;
MDK::Common::System::compat_arch($arch) or
@@ -66,7 +67,7 @@ sub mirrors {
my $qu = quotemeta $_;
$url =~ /\.$qu(?:\..*)?$/ and $land = $url2land{$_};
}
- $mirrors{$url} = [ $land, $dir ];
+ $mirrors{$url} = [ $land, $dir . $sub_dir ];
}
http::getFile('/XXX'); #- close connection.
alarm 0;
@@ -107,7 +108,7 @@ sub version() {
$pkg && $pkg->version || '9.1'; #- safe but dangerous ;-)
}
-sub dir { $mirrors{$_[0]}[1] . ($::corporate && '/corporate' || '') . '/' . version() }
+sub dir { $mirrors{$_[0]}[1] }
sub ftp($) { ftp::new($_[0], dir($_[0])) }
sub getFile {