diff options
author | Mystery Man <unknown@mandriva.org> | 2001-06-11 11:44:34 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2001-06-11 11:44:34 +0000 |
commit | 7507023403933bbd0d851a250a474f85ba6a89d2 (patch) | |
tree | c212a6c0eae5ed2c9964c390ebb72970ec08fd08 /perl-install/crypto.pm | |
parent | ab5559aaabd1167a18ac882e64d97c5adc0e7d03 (diff) | |
download | drakx-topic/ppp.tar drakx-topic/ppp.tar.gz drakx-topic/ppp.tar.bz2 drakx-topic/ppp.tar.xz drakx-topic/ppp.zip |
This commit was manufactured by cvs2svn to create branch 'ppp'.topic/ppp
Diffstat (limited to 'perl-install/crypto.pm')
-rw-r--r-- | perl-install/crypto.pm | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm deleted file mode 100644 index 780539cc9..000000000 --- a/perl-install/crypto.pm +++ /dev/null @@ -1,71 +0,0 @@ -package crypto; # $Id$ - -use diagnostics; -use strict; - -use common qw(:common); -use log; -use ftp; - -my %mirrors = ( - "ftp.ucr.ac.cr" => [ "Costa Rica", "/pub/Unix/linux/mandrake/Mandrake" ], - "ftp.nectec.or.th" => [ "Thailand", "/pub/mirrors/Mandrake-crypto" ], - "ftp.tvd.be" => [ "Belgium", "/packages/mandrake-crypto" ], - "sunsite.mff.cuni.cz" => [ "Czech Republic", "/OS/Linux/Dist/Mandrake-crypto" ], - "ftp.uni-kl.de" => [ "Germany", "/pub/linux/mandrake/Mandrake-crypto" ], - "ftp.duth.gr" => [ "Grece", "/pub/mandrake-crypto" ], - "ftp.leo.org" => [ "Germany", "/pub/comp/os/unix/linux/Mandrake/Mandrake-crypto" ], - "sunsite.uio.no" => [ "Norway", "/pub/unix/Linux/Mandrake-crypto" ], - "ftp.sunet.se" => [ "Sweden", "/pub/Linux/distributions/mandrake-crypto" ], -#- "ackbar" => [ "Ackbar", "/crypto", "a", "a" ], -); - -my %deps = ( - 'libcrypto.so.0' => 'openssl', - 'libssl.so.0' => 'openssl', - 'mod_sxnet.so' => 'mod_ssl-sxnet', -); - -sub require2package { $deps{$_[0]} || $_[0] } -sub mirror2text($) { $mirrors{$_[0]} && "$mirrors{$_[0]}[0] ($_[0])" } -sub mirrors() { keys %mirrors } -sub dir { $mirrors{$_[0]}[1] . '/' . (arch() !~ /i.86/ && ((arch() =~ /sparc/ ? "sparc" : arch()). '/')) . $::VERSION } -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] : (), - $mirrors{$host}[3] ? $mirrors{$host}[3] : () - ); - $$retr->close if $$retr; - $$retr = $ftp->retr($file) or ftp::rewindGetFile(); - $$retr ||= $ftp->retr($file); -} - -sub getDepslist { getFile("depslist-crypto", $_[0]) or die "unable to get depslist-crypto" } - -sub getPackages { - my ($prefix, $packages, $mirror) = @_; - - $crypto::host = $mirror; - - #- extract hdlist of crypto, then depslist. - require pkgs; - 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. - map { pkgs::packageName($_) } pkgs::packagesOfMedium($packages, "Crypto"); -} - -sub get { - my ($mirror, $dir, @files) = @_; - foreach (@files) { - log::l("crypto: downloading $_"); - ftp($mirror)->get($_, "$dir/$_") - } - int @files; -} |