Bug 1111997 - [abrt] dnf: base.py:1894:_retrievePublicKey:TypeError: not all arguments converted during string formatting
[abrt] dnf: base.py:1894:_retrievePublicKey:TypeError: not all arguments conv...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:2072ae1ce5b456c6e707d8432cb...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-22 11:14 EDT by Steve Bryant
Modified: 2014-09-30 19:42 EDT (History)
9 users (show)

See Also:
Fixed In Version: dnf-plugins-core-0.1.1-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-08 22:29:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.52 KB, text/plain)
2014-06-22 11:14 EDT, Steve Bryant
no flags Details
File: environ (2.26 KB, text/plain)
2014-06-22 11:14 EDT, Steve Bryant
no flags Details

  None (edit)
Description Steve Bryant 2014-06-22 11:14:06 EDT
Description of problem:
dnf-0.5.2-1.fc20.noarch

Added a new repo and tried to install software.  When DNF could not find the GPG key locally in /etc/pki/rpm-gpg/spot.gpg it just crashed with the following:

warning: /var/cache/dnf/x86_64/20/fedora-chromium-stable/packages/chromium-35.0.1916.153-1.fc20.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 93054260: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/spot.gpg
Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 206, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 82, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 169, in resolving
    return_code, resultmsgs = base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 227, in do_transaction
    if self.gpgsigcheck(downloadpkgs) != 0:
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 262, in gpgsigcheck
    self.getKeyForPackage(po, fn)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 1995, in getKeyForPackage
    keys = self._retrievePublicKey(keyurl, repo)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 1894, in _retrievePublicKey
    ucd(e))
TypeError: not all arguments converted during string formatting

Manually copying the key from the repo into the expected file fixed the issue, but could this be handled better by DNF?

Version-Release number of selected component:
dnf-0.5.2-1.fc20

Additional info:
reporter:       libreport-2.2.2
cmdline:        /usr/bin/python -OO /bin/dnf install chromium
executable:     /bin/dnf
kernel:         3.14.8-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
base.py:1894:_retrievePublicKey:TypeError: not all arguments converted during string formatting

Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 206, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 82, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 169, in resolving
    return_code, resultmsgs = base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 227, in do_transaction
    if self.gpgsigcheck(downloadpkgs) != 0:
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 262, in gpgsigcheck
    self.getKeyForPackage(po, fn)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 1995, in getKeyForPackage
    keys = self._retrievePublicKey(keyurl, repo)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 1894, in _retrievePublicKey
    ucd(e))
TypeError: not all arguments converted during string formatting

Local variables in innermost frame:
e: IOError(u"Curl error: Couldn't read a file:// file for file:///etc/pki/rpm-gpg/spot.gpg",)
self: <dnf.cli.cli.BaseCli object at 0x7f700f835fd0>
keyurl: u'file:///etc/pki/rpm-gpg/spot.gpg'
repo: <Repo fedora-chromium-stable>
msg: u'Retrieving key from file:///etc/pki/rpm-gpg/spot.gpg'
getSig: True
Comment 1 Steve Bryant 2014-06-22 11:14:10 EDT
Created attachment 911159 [details]
File: backtrace
Comment 2 Steve Bryant 2014-06-22 11:14:13 EDT
Created attachment 911160 [details]
File: environ
Comment 3 Ales Kozumplik 2014-06-23 04:36:57 EDT
Fixed upstream by a09d99c.
Comment 4 Miro Hrončok 2014-06-26 05:20:53 EDT
Another user experienced a similar problem:

Installing Chromium from spot's repo - GPG key not imported.

reporter:       libreport-2.2.2
cmdline:        /usr/bin/python -OO /usr/bin/dnf install chromium
executable:     /usr/bin/dnf
kernel:         3.14.5-200.fc20.x86_64
package:        dnf-0.5.2-1.fc20
reason:         base.py:1894:_retrievePublicKey:TypeError: not all arguments converted during string formatting
runlevel:       N 5
type:           Python
uid:            0
Comment 5 Vadim Rutkovsky 2014-06-30 08:49:08 EDT
Another user experienced a similar problem:

Crashed on installing gstreamer plugins from rpmfusion

reporter:       libreport-2.2.2
cmdline:        /usr/bin/python -OO /bin/dnf install gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-freeworld gstreamer1-plugins-bad-free-extras gstreamer-plugins-bad-nonfree
executable:     /bin/dnf
kernel:         3.14.8-200.fc20.x86_64
package:        dnf-0.5.2-1.fc20
reason:         base.py:1894:_retrievePublicKey:TypeError: not all arguments converted during string formatting
runlevel:       N 5
type:           Python
uid:            0
Comment 6 Jiri Moskovcak 2014-07-04 03:51:01 EDT
Another user experienced a similar problem:

dnf install chromium

reporter:       libreport-2.2.2
cmdline:        /usr/bin/python -OO /bin/dnf install chromium
executable:     /bin/dnf
kernel:         3.14.8-200.fc20.x86_64
package:        dnf-0.5.2-1.fc20
reason:         base.py:1894:_retrievePublicKey:TypeError: not all arguments converted during string formatting
runlevel:       N 5
type:           Python
uid:            0
Comment 7 Udara Madubhashana 2014-07-06 00:39:03 EDT
It can fix following these methods.

Get this repo file:
http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-chromium-stable.repo
and put it in /etc/yum.repos.d/

here is GPG key :
http://repos.fedorapeople.org/repos/spot/chromium-stable/spot.gpg

or by running:
gpg --recv-key 93054260 ; gpg --export --armor 93054260 > spot.gpg

Then, copy it (as root) to /etc/pki/rpm-gpg/
cp -a spot.gpg /etc/pki/rpm-gpg/

after Run : yum install chromium
it will works :)
Comment 8 Fedora Update System 2014-07-07 05:11:44 EDT
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20
Comment 9 Fedora Update System 2014-07-07 21:04:04 EDT
Package dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.1-2.fc20 dnf-0.5.3-1.fc20 hawkey-0.4.17-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8167/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20
then log in and leave karma (feedback).
Comment 10 Fedora Update System 2014-07-08 22:29:57 EDT
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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