Description of problem: I was trying to "undo" installation. Version-Release number of selected component: dnf-0.2.15-3.git5d85f6b.fc18 Additional info: libreport version: 2.0.18 abrt_version: 2.0.18 cmdline: /usr/bin/python /bin/dnf history undo 3 kernel: 3.6.6-3.fc18.x86_64 backtrace: :__init__.py:3755:remove:KeyError: 'pattern' : :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 2439, in doCommand : ret = self._hcmd_undo(base, extcmds) : File "/usr/lib/python2.7/site-packages/dnf/cli/yumcommands.py", line 2303, in _hcmd_undo : if base.history_undo(old): : File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 4305, in history_undo : if self.remove(pkgtup=pkg.pkgtup): : File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 3755, in remove : pattern = kwargs['pattern'] :KeyError: 'pattern' : :Local variables in innermost frame: :tx_return: [] :po: None :self: <dnf.cli.cli.YumBaseCli object at 0x25eb6d0> :pkgs: [] :kwargs: {'pkgtup': (u'celt', u'x86_64', u'0', u'0.11.1', u'4.fc18')}
Created attachment 648345 [details] File: executable
Created attachment 648346 [details] File: environ
Created attachment 648347 [details] File: core_backtrace
Hi Vit, thanks for the report. Undoing history is not yet supported in DNF. Let's use this bugzilla to track the issue.
*** Bug 905211 has been marked as a duplicate of this bug. ***
*** Bug 907143 has been marked as a duplicate of this bug. ***
Hello, was trying dnf, but I am getting an error trying to undo history. version: dnf-0.2.20-1.gitdec970f.fc18.noarch dnf install gcalctool dnf history undo 1 Undoing transaction 1, from Sun Feb 17 23:22:56 2013 Installation gcalctool-6.6.2-1.fc18.x86_64 @fedora 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 303, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 131, in main result, resultmsgs = cli.do_commands() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1478, in do_commands return command.doCommand(self.base.basecmd, self.base.extcmds) File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 2269, in doCommand ret = self._hcmd_undo(extcmds) File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 2135, in _hcmd_undo if self.base.history_undo(old): File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 2877, in history_undo if self.remove(pkgtup=pkg.pkgtup): TypeError: remove() got an unexpected keyword argument 'pkgtup'
dnf.noarch 0:0.2.21-1.git050524e.fc18 does the same
*** Bug 913543 has been marked as a duplicate of this bug. ***
Really looking forward to the "undo" command. Quite the only thing keeping me from shifting to dnf completely.
Adding support for history undo/redo for at least install and erase operations seems like an trivial "s/pkgtup=pkg.pkgtup/pkg.nevra/" operation - based on brief testing it seems to work. Upgrade/downgrade stumble into issues with .from_system property of dnf.Package class which the history package class doesn't have so that needs something more involved. OTOH undo/redo of upgrade/downgrade cannot be guaranteed to succeed anyway as the previous version might not be available in the repositories anymore. Ales, I can provide a patch to enable the easy parts for starters if you want, or would you prefer fixing it all before enabling any of the bits?
> something more involved. OTOH undo/redo of upgrade/downgrade cannot be > guaranteed to succeed anyway as the previous version might not be available > in the repositories anymore. Yeah, nothing we can do anything about. > Ales, I can provide a patch to enable the easy parts for starters if you > want, or would you prefer fixing it all before enabling any of the bits? I guess starting with the easy bits should work as long as we keep this bugzilla open to finish the rest. Do you want to take it?
(not working on this now)
Fixed by 9915abe91b89158f0552d8fa3fbc024a3e9deb16 on master.
dnf-0.4.6-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dnf-0.4.6-1.fc20
Package dnf-0.4.6-1.fc20, libsolv-0.4.0-1.gitd49d319.fc20, hawkey-0.4.4-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-0.4.6-1.fc20 libsolv-0.4.0-1.gitd49d319.fc20 hawkey-0.4.4-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-20333/libsolv-0.4.0-1.gitd49d319.fc20,hawkey-0.4.4-1.fc20,dnf-0.4.6-1.fc20 then log in and leave karma (feedback).
hawkey-0.4.4-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/hawkey-0.4.4-1.fc20
Package hawkey-0.4.4-1.fc20, dnf-0.4.6-1.fc20, libsolv-0.4.0-1.gitd49d319.fc20, librepo-1.3.0-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing hawkey-0.4.4-1.fc20 dnf-0.4.6-1.fc20 libsolv-0.4.0-1.gitd49d319.fc20 librepo-1.3.0-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-20406/dnf-0.4.6-1.fc20,libsolv-0.4.0-1.gitd49d319.fc20,librepo-1.3.0-1.fc20,hawkey-0.4.4-1.fc20 then log in and leave karma (feedback).
if I do a: dnf clean all I get: # dnf update 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 277, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 133, in _main result, resultmsgs = cli.run() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1360, in run load_available_repos=lar) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 223, in activate_sack self._add_repo_to_sack(r.id) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 133, in _add_repo_to_sack repo.load() File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 420, in load handle = self._handle_new_remote(tmpdir) File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 207, in _handle_new_remote h.setopt(librepo.LRO_FASTESTMIRRORCACHE, But I replace LRO_FASTESTMIRRORCACHE with LRO_FASTESTMIRROR, I can then update, but really not sure it is the correct value. Just changed it as a test.
Sorry, was missing the last error: AttributeError: 'module' object has no attribute 'LRO_FASTESTMIRRORCACHE'
(In reply to Heldwin from comment #20) > AttributeError: 'module' object has no attribute 'LRO_FASTESTMIRRORCACHE' That's bug 1024776.
fixed with the latest updates. Installed packages can be erased with undo history command.
Also,"dnf clean all" seems fine
hawkey-0.4.4-1.fc20, dnf-0.4.6-1.fc20, libsolv-0.4.0-1.gitd49d319.fc20, librepo-1.3.0-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.