Bug 1094594 - dnf history rollback tracebacks
dnf history rollback tracebacks
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-06 02:01 EDT by Parag Nemade
Modified: 2014-09-30 19:42 EDT (History)
5 users (show)

See Also:
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 19:57:34 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 Parag Nemade 2014-05-06 02:01:56 EDT
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 03:44:01 EDT
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 09:51:34 EDT
Something to look at, thanks.
Comment 3 Ales Kozumplik 2014-05-09 04:40:23 EDT
Fixed upstream with 23b8cd3.
Comment 4 Fedora Update System 2014-05-28 08:09:07 EDT
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 19:49:02 EDT
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 19:57:34 EDT
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.

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