summaryrefslogtreecommitdiffstats
path: root/perl-install/crypto.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-22 01:10:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-22 01:10:13 +0000
commit1a996ceb744f490f0183099640e7a1eb3ad039c1 (patch)
tree7e599599dc2cd1601dc1f86b7db223ceebc562a9 /perl-install/crypto.pm
parente2df2b17c50af038bbfe15f5b6dd9a21c532ae5b (diff)
downloaddrakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar.gz
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar.bz2
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar.xz
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.zip
no_comment
Diffstat (limited to 'perl-install/crypto.pm')
-rw-r--r--perl-install/crypto.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index ac0904ce1..8d225c828 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -34,6 +34,7 @@ sub ftp($) { ftp::new($_[0], dir($_[0])) }
sub getFile($$) {
my ($file, $host) = @_;
+ $host ||= $crypto::host;
log::l("getting crypto file $file on directory " . dir($host) . " with login $mirrors{$host}[2]");
my ($ftp, $retr) = ftp::new($host, dir($host),
$mirrors{$host}[2] ? $mirrors{$host}[2] : (),
@@ -44,16 +45,16 @@ sub getFile($$) {
$$retr ||= $ftp->retr($file);
}
-sub getDepslist($) { getFile("depslist-crypto", $_[0]) or die "unable to get depslist-crypto" }
-sub getHdlist($) { getFile("hdlist-crypto.cz2", $_[0]) or die "unable to get hdlist-crypto.cz2" }
+sub getDepslist { getFile("depslist-crypto", $_[0]) or die "unable to get depslist-crypto" }
-#sub packages($) { ftp($_[0])->ls }
-sub getPackages($) {
+sub getPackages {
my ($prefix, $packages, $mirror) = @_;
+ $crypto::host = $mirror;
+
#- extract hdlist of crypto, then depslist.
require pkgs;
- pkgs::psUsingHdlist($prefix, '', $packages, getHdlist($mirror), "hdlistCrypto.cz2", "Crypto", '', "Crytographic site", 1) and
+ pkgs::psUsingHdlist($prefix, '', $packages, "hdlist-crypto.cz2", "crypto.cz2", "Crypto", "Cryptographic site", 1, getFile("hdlist-crypto.cz2", $mirror)) and
pkgs::getOtherDeps($packages, getDepslist($mirror));
#- produce an output suitable for visualization.