Bug 867553 - traceback with "dnf erase <package-nvra>"
Summary: traceback with "dnf erase <package-nvra>"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 867552 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-17 17:26 UTC by Joachim Backes
Modified: 2014-09-30 23:40 UTC (History)
2 users (show)

Fixed In Version: dnf-0.2.15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-25 09:45:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joachim Backes 2012-10-17 17:26:58 UTC
Description of problem:
Situation

rpm -q kernel
kernel-3.6.1-2.fc18.x86_64
kernel-3.6.2-2.fc18.x86_64


Now I try to erase kernel-3.6.1-2.fc18.x86_64 and kernel-devel-3.6.1-2.fc18.x86_64 (which is installed too) with dnf (curiosity):

sudo dnf erase  kernel-3.6.1-2.fc18.x86_64 kernel-devel-3.6.1-2.fc18.x86_64
Setting up Remove Process
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/yummain.py", line 316, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/yummain.py", line 140, in main
    result, resultmsgs = base.doCommands()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 483, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/yumcommands.py", line 717, in doCommand
    return base.erasePkgs(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1020, in erasePkgs
    self._checkMaybeYouMeant(arg, always_output=False, rpmdb_only=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 715, in _checkMaybeYouMeant
    self.returnInstalledPackagesByDep(arg))):
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 3140, in returnInstalledPackagesByDep
    return self.rpmdb.getProvides(depname, depflags, depver).keys()
AttributeError: 'YumBaseCli' object has no attribute 'rpmdb'

Version-Release number of selected component (if applicable):
dnf-0.2.13-1.gitda60a96.fc18.noarch

How reproducible:


Steps to Reproduce:
1.sudo dnf erase kernel-3.6.1-2.fc18.x86_64 kernel-devel-3.6.1-2.fc18.x86_64
2.
3.
  
Actual results:
See description

Expected results:
packeges deleted

Additional info:

Tried a second time:

sudo dnf erase  kernel-3.6.1-2.fc18.x86_64 kernel-devel-3.6.1-2.fc18.x86_64
BDB2053 Freeing read locks for locker 0xef5: 16506/140569054693312
BDB2053 Freeing read locks for locker 0xef6: 16506/140569054693312
BDB2053 Freeing read locks for locker 0xef7: 16506/140569054693312
BDB2053 Freeing read locks for locker 0xef8: 16506/140569054693312
Setting up Remove Process
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/yummain.py", line 316, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/yummain.py", line 140, in main
    result, resultmsgs = base.doCommands()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 483, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/yumcommands.py", line 717, in doCommand
    return base.erasePkgs(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1020, in erasePkgs
    self._checkMaybeYouMeant(arg, always_output=False, rpmdb_only=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 715, in _checkMaybeYouMeant
    self.returnInstalledPackagesByDep(arg))):
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 3140, in returnInstalledPackagesByDep
    return self.rpmdb.getProvides(depname, depflags, depver).keys()
AttributeError: 'YumBaseCli' object has no attribute 'rpmdb'

Comment 1 Ales Kozumplik 2012-10-18 09:19:41 UTC
*** Bug 867552 has been marked as a duplicate of this bug. ***

Comment 2 Ales Kozumplik 2012-10-18 09:50:54 UTC
Thank you for the report.

This is a valid problem, reproducible whenever a full N(E)VRA of a package for deletion is specified, not just kernel:

dnf erase xguest-1.0.10-4.fc17.noarch

Looking for a fix now.

Comment 3 Ales Kozumplik 2012-10-22 09:25:42 UTC
Master commit b2bb94c deals with this issue for the erase command. I'm also working on a support for full NEVRA specification for update and install.


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