Hide Forgot
Description of problem: This happens every time I try to rollback with 'yum history rollback 2009': Loaded plugins: auto-update-debuginfo, presto, refresh-packagekit Rollback to transaction 2009, from Tue Nov 22 08:31:44 2011 Undoing the following transactions: 2010, 2011, 2012, 2013, 2014, 2015, 2016, : 2017, 2018, 2019, 2020, 2021, 2022, 2023 Traceback (most recent call last): File "/usr/bin/yum", line 29, in <module> yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 315, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 140, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 483, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 2548, in doCommand ret = self._hcmd_rollback(base, extcmds) File "/usr/share/yum-cli/yumcommands.py", line 2447, in _hcmd_rollback base.historyInfoCmdPkgsAltered(mobj) File "/usr/share/yum-cli/output.py", line 2257, in historyInfoCmdPkgsAltered for hpkg in old.trans_data: File "/usr/lib/python2.7/site-packages/yum/history.py", line 307, in <lambda> trans_data = property(fget=lambda self: self._getTransData()) File "/usr/lib/python2.7/site-packages/yum/history.py", line 590, in _getTransData _move_pkg_f(xfpkg, nfstate) File "/usr/lib/python2.7/site-packages/yum/history.py", line 459, in _move_pkg_f self._move_pkg(sk, nstate, fpkgtup2pkg, fpkgstate2pkg) File "/usr/lib/python2.7/site-packages/yum/history.py", line 449, in _move_pkg xpkg = self._conv_pkg_state(xpkg, nstate) File "/usr/lib/python2.7/site-packages/yum/history.py", line 429, in _conv_pkg_state pkg._history) File "/usr/lib/python2.7/site-packages/yum/history.py", line 220, in __init__ checksum, history) File "/usr/lib/python2.7/site-packages/yum/history.py", line 162, in __init__ chk = checksum.split(':') AttributeError: YumHistory instance has no attribute 'split' Version-Release number of selected component (if applicable): yum-3.4.3-11.fc17.noarch How reproducible: every time Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Downgrading to yum-3.4.3-5.fc17.noarch appears to make 'rollback' more functional. I tried all the yum packages between -11 and -5 (that I could find in my cache dirs) and -5 was the first one to 'work'.
Here is the upstream fix: commit 2216e1a8d352718e92ebb14ff57f9635d960c29c Author: James Antill <james> Date: Thu Dec 1 13:09:29 2011 -0500 Fix _conv_pkg_state when calling with history as checksum. BZ 757736. diff --git a/yum/history.py b/yum/history.py index d27fa44..0a29059 100644 --- a/yum/history.py +++ b/yum/history.py @@ -426,7 +426,7 @@ class YumMergedHistoryTransaction(YumHistoryTransaction): def _conv_pkg_state(pkg, state): npkg = YumHistoryPackageState(pkg.name, pkg.arch, pkg.epoch,pkg.version,pkg.release, state, - pkg._history) + history=pkg._history) npkg._checksums = pkg._checksums npkg.done = pkg.done if _sttxt2stcode[npkg.state] in TS_INSTALL_STATES:
I can confirm that with this change, -11 "works for me". Thanks.
Seems to work with yum-3.4.3-15.fc17.noarch