From 0fd7fc3b62f0974b96dd5e7c88c1a15dfff28aea Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 16 Oct 2003 12:29:33 +0000 Subject: fixed to avoid opening 2 ftp files at the same time. --- perl-install/pkgs.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'perl-install/pkgs.pm') diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 2c7cc01f9..7a777e0ba 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -377,7 +377,7 @@ sub psUsingHdlists { } sub psUsingHdlist { - my ($prefix, $method, $packages, $hdlist, $medium, $rpmsdir, $descr, $selected, $o_fhdlist, $o_fpubkey) = @_; + my ($prefix, $method, $packages, $hdlist, $medium, $rpmsdir, $descr, $selected, $o_fhdlist, $o_pubkey) = @_; my $fakemedium = "$descr ($method$medium)"; my $urpmidir = -w "$prefix/var/lib/urpmi" ? "$prefix/var/lib/urpmi" : "/tmp"; log::l("trying to read $hdlist for medium $medium"); @@ -415,9 +415,12 @@ sub psUsingHdlist { #- get all keys corresponding in the right pubkey file, #- they will be added in rpmdb later if not found. - if (!$o_fhdlist || $o_fpubkey) { - my $pubkey = $o_fpubkey || install_any::getFile("Mandrake/base/pubkey" . ($hdlist =~ /hdlist(\S*)\.cz2?/ && $1)); - $m->{pubkey} = [ $packages->parse_armored_file($pubkey) ]; + if (!$o_fhdlist || $o_pubkey) { + $m->{pubkey} = $o_pubkey; + unless ($m->{pubkey}) { + my $pubkey = $o_fpubkey || install_any::getFile("Mandrake/base/pubkey" . ($hdlist =~ /hdlist(\S*)\.cz2?/ && $1)); + $m->{pubkey} = [ $packages->parse_armored_file($pubkey) ]; + } } #- integrate medium in media list, only here to avoid download error (update) to be propagated. -- cgit v1.2.1