Bug 1094594

Summary: dnf history rollback tracebacks
Product: [Fedora] Fedora Reporter: Parag Nemade <pnemade>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, jzeleny, pnemade, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugins-core-0.0.8-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-31 23:57:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Parag Nemade 2014-05-06 06:01:56 UTC
Description of problem:
$ sudo dnf history rollback 133
Rollback to transaction 133, from Mon May  5 20:13:26 2014
  Undoing the following transactions: 134, 135
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 206, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 82, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 132, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1164, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.py", line 1580, in run
    ret = self._hcmd_rollback(extcmds[1:])
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.py", line 1490, in _hcmd_rollback
    return self.base.history_rollback_transaction(extcmd)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 743, in history_rollback_transaction
    self.output.historyInfoCmdPkgsAltered(mobj)  # :todo
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 1984, in historyInfoCmdPkgsAltered
    for hpkg in old.trans_data:
  File "/usr/lib/python2.7/site-packages/dnf/yum/history.py", line 389, in <lambda>
    trans_data = property(fget=lambda self: self._getTransData())
  File "/usr/lib/python2.7/site-packages/dnf/yum/history.py", line 563, in _getTransData
    npkgtup2pkg, npkgstate2pkg = self._list2dict(obj.trans_data)
  File "/usr/lib/python2.7/site-packages/dnf/yum/history.py", line 503, in _list2dict
    key = YumMergedHistoryTransaction._p2sk(pkg)
  File "/usr/lib/python2.7/site-packages/dnf/yum/history.py", line 496, in _p2sk
    return (pkg.name, dnf.arch.basearch(pkg.arch), state)
  File "/usr/lib/python2.7/site-packages/dnf/arch.py", line 47, in basearch
    return _BASEARCH_MAP[arch]
KeyError: u'noarch'


Version-Release number of selected component (if applicable):
dnf-0.5.1-1.fc20.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Note, after this I have done many small transactions so my machine is not now in a state to work further on this issue but I just want to report this problem I faced.

Comment 1 Tim Lauridsen 2014-05-06 07:44:01 UTC
looked like yum's getBaseArch has a safety check
http://goo.gl/NvUjJX

So this is why this has not blownup before archs was refactored in dnf

Comment 2 Ales Kozumplik 2014-05-06 13:51:34 UTC
Something to look at, thanks.

Comment 3 Ales Kozumplik 2014-05-09 08:40:23 UTC
Fixed upstream with 23b8cd3.

Comment 4 Fedora Update System 2014-05-28 12:09:07 UTC
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20

Comment 5 Fedora Update System 2014-05-28 23:49:02 UTC
Package dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-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-plugins-core-0.0.8-2.fc20 libsolv-0.6.1-1.git6d968f1.fc20 hawkey-0.4.16-1.fc20 dnf-0.5.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6789/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-05-31 23:57:34 UTC
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.