aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-10-05 12:20:28 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-10-05 12:20:28 +0000
commit7cbfe7c2765030f0d4a9b24abc21716aae158f83 (patch)
tree0d0997daec46e4c8ec7b200980665c4dc2dec746
parent803f5383a8b1ce4f89aaadbfee0f651fc39f7904 (diff)
downloadperl-URPM-7cbfe7c2765030f0d4a9b24abc21716aae158f83.tar
perl-URPM-7cbfe7c2765030f0d4a9b24abc21716aae158f83.tar.gz
perl-URPM-7cbfe7c2765030f0d4a9b24abc21716aae158f83.tar.bz2
perl-URPM-7cbfe7c2765030f0d4a9b24abc21716aae158f83.tar.xz
perl-URPM-7cbfe7c2765030f0d4a9b24abc21716aae158f83.zip
fix lookup of existing pubkeys (#53710)
-rw-r--r--NEWS2
-rw-r--r--URPM/Signature.pm4
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index c39bbbe..a14ae43 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix lookup of existing pubkeys (#53710) (by Pascal Terjan)
+
Version 3.30 - 11 May 2009, by Christophe Fergeau
- rework public key handling since librpm behaviour has changed. It's no longer
diff --git a/URPM/Signature.pm b/URPM/Signature.pm
index 71bccc0..0c2eda0 100644
--- a/URPM/Signature.pm
+++ b/URPM/Signature.pm
@@ -62,7 +62,7 @@ sub import_needed_pubkeys_from_file {
my @keys = parse_pubkeys_($db);
my $keyid = substr get_gpg_fingerprint($pubkey_file), 8;
- my ($kv) = grep { ($keyid == $_->{id}) } @keys;
+ my ($kv) = grep { (hex($keyid) == hex($_->{id})) } @keys;
my $imported;
if (!$kv) {
if (!import_pubkey_file($db, $pubkey_file)) {
@@ -72,7 +72,7 @@ sub import_needed_pubkeys_from_file {
$imported = 1;
}
@keys = parse_pubkeys_($db);
- ($kv) = grep { ($keyid == $_->{id}) } @keys;
+ ($kv) = grep { (hex($keyid) == hex($_->{id})) } @keys;
}
#- let the caller know about what has been found.