Bug 905211

Summary: 'dnf history undo' does not work (remove:KeyError: 'pattern')
Product: [Fedora] Fedora Reporter: Richard Marko <rmarko>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: akozumpl, jberan, jzeleny
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:99a0816e0481df4f31be9be7ffa7d0fe4fa3f251
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-04 09:16:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: core_backtrace
none
File: screencast.ogv none

Description Richard Marko 2013-01-28 20:57:59 UTC
Description of problem:
dnf history undo 27

Version-Release number of selected component:
dnf-0.2.17-1.git6a055e6.fc18

Additional info:
cmdline:        /usr/bin/python /bin/dnf history undo 27
executable:     /bin/dnf
kernel:         3.7.2-204.fc18.x86_64
uid:            0

Truncated backtrace:
__init__.py:2781:remove:KeyError: 'pattern'

Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 314, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 141, in main
    result, resultmsgs = cli.do_commands()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1457, in do_commands
    return command.doCommand(self.base.basecmd, self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 2262, in doCommand
    ret = self._hcmd_undo(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 2128, in _hcmd_undo
    if self.base.history_undo(old):
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 3071, in history_undo
    if self.remove(pkgtup=pkg.pkgtup):
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 2781, in remove
    pattern = kwargs['pattern']
KeyError: 'pattern'

Local variables in innermost frame:
tx_return: []
po: None
self: <dnf.cli.cli.YumBaseCli object at 0x2ca1790>
pkgs: []
kwargs: {'pkgtup': (u'python-dmidecode', u'x86_64', u'0', u'3.10.13', u'6.fc18')}

Comment 1 Richard Marko 2013-01-28 20:58:02 UTC
Created attachment 689332 [details]
File: backtrace

Comment 2 Richard Marko 2013-01-28 20:58:04 UTC
Created attachment 689333 [details]
File: core_backtrace

Comment 3 Richard Marko 2013-01-28 20:58:09 UTC
Created attachment 689334 [details]
File: screencast.ogv

Comment 4 Ales Kozumplik 2013-01-29 07:21:06 UTC
Hi Richard,

thank you for opening this. 'history undo' is a known missing functionality. I'll use this bugzilla to keep the track of it.

Ales

Comment 5 Ales Kozumplik 2013-02-04 09:16:02 UTC
I realized today that there's an older bug for this, closign as dup.

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