Bug 410421 - yum fails to import a GPG key
Summary: yum fails to import a GPG key
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 8
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-04 14:16 UTC by Fabrice Bellet
Modified: 2014-01-21 23:00 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-12-04 15:09:08 UTC
Type: ---
Embargoed:


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

Description Fabrice Bellet 2007-12-04 14:16:13 UTC
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 14:18:31 UTC
Created attachment 277031 [details]
suggested patch

this patch works for me.

Comment 2 Seth Vidal 2007-12-04 14:23:24 UTC
Can you attach a copy of the public key so I can take a look?

Comment 3 Fabrice Bellet 2007-12-04 14:26:05 UTC
Created attachment 277041 [details]
gpg key causing the problem

Comment 4 Seth Vidal 2007-12-04 15:09:08 UTC
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-05 01:13:18 UTC
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 15:44:49 UTC
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.