From b128756215cd5c8cddc5d17a5b4b1fd6cff1fc33 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 3 Mar 2004 09:15:17 +0000 Subject: - community updates are not in a per-version directory either - cooker & community urls do contain .../RPMS at the end whereas updates directory do not, handle this --- perl-install/crypto.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm index 1e858907c..3415fa43d 100644 --- a/perl-install/crypto.pm +++ b/perl-install/crypto.pm @@ -57,7 +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(); + my $sub_dir = $distro_type =~ /cooker|community/ ? '' : ($::corporate ? '/corporate' : '') . '/' . version(); foreach (<$f>) { my ($arch, $url, $dir) = m|$distro_type([^:]*):ftp://([^/]*)(/\S*)| or next; MDK::Common::System::compat_arch($arch) or @@ -67,6 +67,7 @@ sub mirrors { my $qu = quotemeta $_; $url =~ /\.$qu(?:\..*)?$/ and $land = $url2land{$_}; } + $dir =~ s!/RPMS$!!; $mirrors{$url} = [ $land, $dir . $sub_dir ]; } http::getFile('/XXX'); #- close connection. -- cgit v1.2.1