diff options
author | Francois Pons <fpons@mandriva.com> | 2003-08-11 14:05:21 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-08-11 14:05:21 +0000 |
commit | 536743e1769ab66e318a842c38428ba831a4c6c5 (patch) | |
tree | 4704b42e5bf0a45e19f4136e432c4a713ceb8a10 /urpm.pm | |
parent | 538c66f10fbf23063658e5d58922f8d447569c16 (diff) | |
download | urpmi-536743e1769ab66e318a842c38428ba831a4c6c5.tar urpmi-536743e1769ab66e318a842c38428ba831a4c6c5.tar.gz urpmi-536743e1769ab66e318a842c38428ba831a4c6c5.tar.bz2 urpmi-536743e1769ab66e318a842c38428ba831a4c6c5.tar.xz urpmi-536743e1769ab66e318a842c38428ba831a4c6c5.zip |
4.4-20mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1807,24 +1807,25 @@ this could happen if you mounted manually the directory when creating the medium unless ($error) { #- now... on pubkey - if (-s "$medium->{cachedir}/partial/pubkey") { + if (-s "$urpm->{cachedir}/partial/pubkey") { $urpm->{log}(N("examining pubkey file of \"%s\"...", $medium->{name})); - my (%keys, %unknown_keys); + my %key_ids; eval { - foreach ($urpm->parse_armored_file("$medium->{cachedir}/partial/pubkey")) { + foreach ($urpm->parse_armored_file("$urpm->{cachedir}/partial/pubkey")) { my $id; foreach my $kv (values %{$urpm->{keys} || {}}) { - $kv->{content} = $_->{content} and $keys{$id = $kv->{id}} = undef, last; + $kv->{content} = $_->{content} and $key_ids{$id = $kv->{id}} = undef, last; } unless ($id) { #- the key has not been found, this is important to import it now, #- update keys hash (as we do not know how to get key id from its content). #- and parse again to found the key. - $urpm->import_armored_file("$medium->{cachedir}/partial/pubkey", root => $urpm->{root}); + $urpm->{log}(N("...importing pubkey file of \"%s\"", $medium->{name})); + $urpm->import_armored_file("$urpm->{cachedir}/partial/pubkey", root => $urpm->{root}); $urpm->parse_pubkeys(root => $urpm->{root}); foreach my $kv (values %{$urpm->{keys} || {}}) { - $kv->{content} = $_->{content} and $keys{$id = $kv->{id}} = undef, last; + $kv->{content} = $_->{content} and $key_ids{$id = $kv->{id}} = undef, last; } #- now id should be defined, or there is a problem to import the keys... @@ -1832,7 +1833,7 @@ this could happen if you mounted manually the directory when creating the medium } } }; - %keys and $medium->{'key-ids'} = join ',', keys %keys; + keys(%key_ids) and $medium->{'key-ids'} = join ',', keys %key_ids; } } |