Bug 410421 - yum fails to import a GPG key
yum fails to import a GPG key
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-12-04 09:16 EST by Fabrice Bellet
Modified: 2014-01-21 18:00 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-12-04 10:09:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
suggested patch (551 bytes, patch)
2007-12-04 09:18 EST, Fabrice Bellet
no flags Details | Diff
gpg key causing the problem (1.32 KB, text/plain)
2007-12-04 09:26 EST, Fabrice Bellet
no flags Details

  None (edit)
Description Fabrice Bellet 2007-12-04 09:16:13 EST
yum fails to import my own GPG key automatically (I package some stuff for
Fedora, and I have setup my own yum repo). It fails with the error "GPG key
parsing failed: can't set attribute", which appears to be an exception generated
by "self.user_id = user_id[0].id" in the load() method of the gpg_certificate()
class. The code has probably been modified in the "if self.version == 3" part,
but not in the "self.version == 4" part. 

Moreover, there's another place where "self.user_id = user_id[0].id" occurs in
the "self.version == 3" part, around line 889. This one didn't cause problem for
me, but it's probably worth fixing it too.
Comment 1 Fabrice Bellet 2007-12-04 09:18:31 EST
Created attachment 277031 [details]
suggested patch

this patch works for me.
Comment 2 Seth Vidal 2007-12-04 09:23:24 EST
Can you attach a copy of the public key so I can take a look?
Comment 3 Fabrice Bellet 2007-12-04 09:26:05 EST
Created attachment 277041 [details]
gpg key causing the problem
Comment 4 Seth Vidal 2007-12-04 10:09:08 EST
agreed about your patch - this appears to be a not-often-hit problem.

I'll apply your patch but one thing - that gpg key is expired.
Comment 5 Michal Schmidt 2007-12-04 20:13:18 EST
I have just hit the same bug and fixed it locally in the same way :-) It was 
caused by GPG keys with multiple identities. My GPG key has two uids.

The problem might have been hit more often than we think. People hitting it 
may have not realized it was a bug and they worked-around it using 
rpm --import.
Comment 6 Russell Harrison 2008-04-10 11:44:49 EDT
I just hit this bug with yum-3.2.8-2.fc8 in F8.  Applying the patch above by
hand resolved the issue.

Note You need to log in before you can comment on or make changes to this bug.