Bug 454163

Summary: Importing GPG keys with non-ASCII userid fails
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: ffesti, james.antill, katzj, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.2.17-2.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-24 02:11:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ville Skyttä 2008-07-05 19:18:35 UTC
yum-3.2.16-2.fc9.noarch fails to import my GPG key due to Unicode decode error:

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID a0adfbdf
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 241, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 193, in main
    base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 366, in doTransaction
    if self.gpgsigcheck(downloadpkgs) != 0:
  File "/usr/share/yum-cli/cli.py", line 466, in gpgsigcheck
    self.getKeyForPackage(po, lambda x, y, z: self.userconfirm())
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 2671, in
getKeyForPackage
    self.logger.critical(_('Importing GPG key 0x%s "%s" from %s') % (hexkeyid,
userid, keyurl.replace("file://","")))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal
not in range(128)

The userid in my key is "Ville Skyttä <ville.skytta>".

A repo with which this can be reproduced is at http://cachalot.mine.nu/9/, repo
file http://cachalot.mine.nu/cachalot.repo

Comment 1 James Antill 2008-07-05 22:40:30 UTC
 Can you try putting to_unicode() around the userid variable above?

Comment 2 Ville Skyttä 2008-07-06 07:28:10 UTC
Yes, that fixes it.

Comment 3 James Antill 2008-07-07 04:38:39 UTC
 Ok, it should be fixed in 3.2.17 then when that comes out (probably this week).


Comment 4 Fedora Update System 2008-07-09 14:51:19 UTC
yum-3.2.17-1.fc9 has been submitted as an update for Fedora 9

Comment 5 Fedora Update System 2008-07-09 21:50:54 UTC
yum-3.2.17-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-6301

Comment 6 Fedora Update System 2008-07-22 17:28:25 UTC
yum-3.2.17-2.fc8 has been submitted as an update for Fedora 8

Comment 7 Fedora Update System 2008-07-24 02:11:10 UTC
yum-3.2.17-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2008-08-07 17:16:54 UTC
yum-3.2.18-1.fc8 has been submitted as an update for Fedora 8

Comment 9 Fedora Update System 2008-08-27 18:02:29 UTC
yum-3.2.19-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/yum-3.2.19-1.fc8

Comment 10 Fedora Update System 2008-09-10 06:58:52 UTC
yum-3.2.19-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.