Bug 1278631 - Installing packages via file path or URL causes local plugin to crash
Installing packages via file path or URL causes local plugin to crash
Status: CLOSED DUPLICATE of bug 1226766
Product: Fedora
Classification: Fedora
Component: dnf-plugins-extras (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Igor Gnatenko
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-11-05 21:47 EST by Garrett Holmstrom
Modified: 2015-11-09 08:16 EST (History)
6 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Garrett Holmstrom 2015-11-05 21:47:23 EST
Description of problem:
If the local plugin is installed, when I try to install a package by passing its location to dnf at the command line dnf crashes immediately after installing packages due to a KeyError for the "@commandline" repo.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1.  dnf install dnf-plugins-extras-local
2.  dnf install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm

Actual results:
% sudo dnf install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
Last metadata expiration check performed 2:46:16 ago on Thu Nov  5 15:29:41 2015.
Dependencies resolved.
 Package                  Arch       Version     Repository        Size
 adobe-release-x86_64     noarch     1.0-1       @commandline     4.2 k

Transaction Summary
Install  1 Package

Total size: 4.2 k
Installed size: 1.9 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : adobe-release-x86_64-1.0-1.noarch                   1/1 
  Verifying   : adobe-release-x86_64-1.0-1.noarch                   1/1 

  adobe-release-x86_64.noarch 1.0-1                                     

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 198, 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 144, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 183, in resolving
  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 119, in transaction
    if pkg.repo.pkgdir == repodir:
  File "/usr/lib/python2.7/site-packages/dnf/package.py", line 115, in repo
    return self.base.repos[self.reponame]
KeyError: u'@commandline'

Additional info:
This occurs on both Fedora 22 and 23.

Packages are installed, but not copied to the local package repo.
Comment 1 Honza Silhan 2015-11-09 08:16:58 EST

*** This bug has been marked as a duplicate of bug 1226766 ***

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