From 855dda4bbb078c327a8c4b772473e97d23075c03 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 16 Oct 2003 12:34:44 +0000 Subject: fixed code to avoid opening 2 files simultaneously. --- perl-install/crypto.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm index 60ac69d4d..d2bb09117 100644 --- a/perl-install/crypto.pm +++ b/perl-install/crypto.pm @@ -126,6 +126,13 @@ sub getPackages { $crypto::host = $mirror; + #- get pubkey file first as we cannot handle 2 files opened simultaneously. + my $pubkey; + eval { + my $fpubkey = getFile("base/pubkey", $mirror); + $pubkey = [ $packages->parse_armored_file($fpubkey) ]; + }; + #- check first if there is something to get... my $fhdlist = getFile("base/hdlist.cz", $mirror); unless ($fhdlist) { @@ -137,7 +144,7 @@ sub getPackages { #- extract hdlist of crypto, then depslist. require pkgs; my $update_medium = pkgs::psUsingHdlist($prefix, 'ftp', $packages, "hdlist-updates.cz", "1u", "RPMS", - "Updates for Mandrake Linux " . version(), 1, $fhdlist, $fpubkey); + "Updates for Mandrake Linux " . version(), 1, $fhdlist, $pubkey); if ($update_medium) { log::l("read updates hdlist"); #- keep in mind where is the URL prefix used according to mirror (for install_any::install_urpmi). -- cgit v1.2.1