Bug 1226766 - [abrt] dnf: package.py:108:repo:KeyError: u'@commandline'
Summary: [abrt] dnf: package.py:108:repo:KeyError: u'@commandline'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-extras
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:4a5aa9ffdb5bc2f701ef583fe9e...
: 1236727 1236742 1268856 1278631 1289231 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-01 04:08 UTC by Hedayat Vatankhah
Modified: 2016-04-07 10:29 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-07 10:27:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.23 KB, text/plain)
2015-06-01 04:08 UTC, Hedayat Vatankhah
no flags Details
File: dso_list (82 bytes, text/plain)
2015-06-01 04:08 UTC, Hedayat Vatankhah
no flags Details
File: environ (3.56 KB, text/plain)
2015-06-01 04:08 UTC, Hedayat Vatankhah
no flags Details

Description Hedayat Vatankhah 2015-06-01 04:08:22 UTC
Description of problem:
This is the DNF backtrace (actually, the 'local' plugin) when a local RPM package is installed using DNF. 

Version-Release number of selected component:
dnf-1.0.0-1.fc22

Additional info:
reporter:       libreport-2.5.1
cmdline:        /usr/bin/python -OO /usr/bin/dnf install /mnt/var/lib/yum/plugins/local_f21/akmod-nvidia-340xx-340.76-2.fc21.x86_64.rpm
executable:     /usr/bin/dnf
kernel:         4.0.4-301.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
package.py:108:repo:KeyError: u'@commandline'

Traceback (most recent call last):
  File "/usr/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 185, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, 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 170, in resolving
    base.plugins.run_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/local.py", line 125, in transaction
    if pkg.repo.pkgdir == repodir:
  File "/usr/lib/python2.7/site-packages/dnf/package.py", line 108, in repo
    return self.base.repos[self.reponame]
KeyError: u'@commandline'

Local variables in innermost frame:
self: <hawkey.Package object id 52522, akmod-nvidia-340xx-1:340.76-2.fc21.x86_64, @commandline>

Comment 1 Hedayat Vatankhah 2015-06-01 04:08:27 UTC
Created attachment 1033109 [details]
File: backtrace

Comment 2 Hedayat Vatankhah 2015-06-01 04:08:31 UTC
Created attachment 1033110 [details]
File: dso_list

Comment 3 Hedayat Vatankhah 2015-06-01 04:08:34 UTC
Created attachment 1033111 [details]
File: environ

Comment 4 Honza Silhan 2015-06-01 10:55:15 UTC
Thanks for the report. @commandline is a fake repository for local rpms loaded from command line and the repo is not (and should not be) accessible from DNF. Igor, don't call `repo` on Package object - this is not in API and probably will be erased. Use `base.repos` and watch out for KeyError instead. Thanks.

Comment 5 Mike 2015-06-05 02:53:45 UTC
I got the same error, doing a local install of plexmediaserver:

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 185, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, 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 170, in resolving
    base.plugins.run_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/local.py", line 123, in transaction
    if pkg.repo.pkgdir == repodir:
  File "/usr/lib/python2.7/site-packages/dnf/package.py", line 108, in repo
    return self.base.repos[self.reponame]
KeyError: u'@commandline'

Comment 6 Radek Holy 2015-06-30 06:45:32 UTC
*** Bug 1236727 has been marked as a duplicate of this bug. ***

Comment 7 Radek Holy 2015-06-30 06:46:51 UTC
*** Bug 1236742 has been marked as a duplicate of this bug. ***

Comment 8 Igor Gnatenko 2015-06-30 16:41:10 UTC
Will fix ASAP.

Comment 9 Honza Silhan 2015-10-13 14:10:38 UTC
*** Bug 1268856 has been marked as a duplicate of this bug. ***

Comment 10 Honza Silhan 2015-11-09 13:16:58 UTC
*** Bug 1278631 has been marked as a duplicate of this bug. ***

Comment 12 Igor Gnatenko 2016-04-07 10:29:49 UTC
*** Bug 1289231 has been marked as a duplicate of this bug. ***


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