manatools / dnfdaemon

DBus daemon for doing package action with the dnf package manager
GNU General Public License v2.0
12 stars 16 forks source link

_history_undo_operations does not work with dnf 4.6 #41

Open mikhailnov opened 3 years ago

mikhailnov commented 3 years ago

Private API (https://bugzilla.redhat.com/show_bug.cgi?id=1079526) has broken in dnf 4.6.1 in rosa2019.1, because undoing transaction in dnfdragora does not work:

Event received HistoryUndo, g-io-error-quark: GDBus.Error:org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.8/site-packages/dnfdaemon/server/__init__.py", line 68, in newFunc
    rc = func(*args, **kwargs)
  File "/usr/share/dnfdaemon/dnfdaemon-system", line 305, in HistoryUndo
    value = self.history_undo(tid)
  File "/usr/lib/python3.8/site-packages/dnfdaemon/server/__init__.py", line 705, in history_undo
    self.base._history_undo_operations(mobj, old.tid)
AttributeError: 'DnfBase' object has no attribute '_history_undo_operations'
 (36) - status DNFDragoraStatus.RUNNING
BuildTransaction failure

It was removed in dnf 4.6: Remove Base._history_undo_operations() as it was replaced with transaction_sr code https://github.com/rpm-software-management/dnf/commit/c826d7db4

mikhailnov commented 3 years ago

New API is _revert_transaction, see git diff 4.5.2..4.6.1 in dnf.

anaselli commented 3 years ago

I know dnf added api and moreover they provide something to fix it also in dnfdaemon. I haven't tested it on master yet since i'm pretty busy with new libyui tree to manage and see how it works. have you tested it on master either dnf-daemon and dnfdragora? BTW that was in my todo list first point of async working :D

mikhailnov commented 3 years ago

have you tested it on master either dnf-daemon and dnfdragora?

I have latest releases of dnfdaemon dnf dnfdragora plus I today cherry-picked all potentially useful patches, including all post-release commits in dnfdaemon, that does not help (just because those patches do not change usage of removed API). dnf is 4.6.1.

mikhailnov commented 3 years ago

i'm pretty busy with new libyui tree to manage and see how it works

By the way I wanted to ask how dnfdragora and Co stuff will work with the newest libyui ))

anaselli commented 3 years ago

By the way I wanted to ask how dnfdragora and Co stuff will work with the newest libyui ))

Well hopefully well at last :) new tree is changed but API should be the same, i expect some problems in building libyui-mga and its plugins and libyui-gtk just because they trust on legacy stuff that i suspect is not installed as before... Unfortunately i can't work on those projects (and this too) full time and my real job takes me a lot... otherwise i would have worked during suse changes...