summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-08-11 14:05:21 +0000
committerFrancois Pons <fpons@mandriva.com>2003-08-11 14:05:21 +0000
commit536743e1769ab66e318a842c38428ba831a4c6c5 (patch)
tree4704b42e5bf0a45e19f4136e432c4a713ceb8a10 /urpm.pm
parent538c66f10fbf23063658e5d58922f8d447569c16 (diff)
downloadurpmi-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.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/urpm.pm b/urpm.pm
index 91a79378..a4195df7 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -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;
}
}