Bug 867553 - traceback with "dnf erase <package-nvra>"
traceback with "dnf erase <package-nvra>"
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
: 867552 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-17 13:26 EDT by Joachim Backes
Modified: 2014-09-30 19:40 EDT (History)
2 users (show)

See Also:
Fixed In Version: dnf-0.2.15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-25 05:45:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joachim Backes 2012-10-17 13:26:58 EDT
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 05:19:41 EDT
*** Bug 867552 has been marked as a duplicate of this bug. ***
Comment 2 Ales Kozumplik 2012-10-18 05:50:54 EDT
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 05:25:42 EDT
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.