Description of problem: dnf-2 hidden some calls that used to be public, by prepending '_' to them. otopi uses some of these, and currently works around this change by calling the hidden names. See also bug 1455452. Using such private methods is a risk - dnf is allowed to drop them anytime, or change their signature or functionality, thus break otopi, and with it, all the tools that use it - including engine-setup, ovirt-host-deploy, etc. So dnf should expose the functionality of these methods using official ones (see bug 1542482 for that) and then otopi should use these new official ones. [1] https://bugzilla.redhat.com/showdependencytree.cgi?id=1455452&hide_resolved=0
113041 removes use of _group_by_id. Remaining: - base._plugins._unload - seems to be needed. Need to open a bug on dnf to expose it. - dnf.__version__ - perhaps OK? dnf's code defines it as: "__version__ = VERSION # :api". So perhaps it's part of the official API. - base._history_undo_operations - Does not exist anymore in dnf code, was removed recently in [1]. So we might be broken soon (once [1] is included in EL). Need to either find out how to implement using existing API or open a bug on dnf to expose/document how to do this. [1] https://github.com/rpm-software-management/dnf/commit/69ce000e433784b5eb70e94ccb1766d5bf878690
Now got a report [1] about another method - dnf.history.open_history - removed in dnf 3 [2]. This causes rollback, e.g. in engine-setup doing upgrade, to not rollback the packages. [1] https://lists.ovirt.org/archives/list/users@ovirt.org/thread/EZJTUOHNHKT7YBO222QVLA5VVBXCXZFD/ [2] https://github.com/rpm-software-management/dnf/commit/8198019c0488258be589af3935a1bc579ab29786
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Daniel, can you please advise about doing 'dnf history undo' using the API? See comment 2. Can't find anything in the api reference. Thanks.
(In reply to Yedidyah Bar David from comment #7) > Daniel, can you please advise about doing 'dnf history undo' using the API? > See comment 2. Can't find anything in the api reference. Thanks. I spent some time looking at relevant code and changes in dnf and came up with: https://gerrit.ovirt.org/c/otopi/+/116476 What do you say?
Decided to split comment 2 to its own bug 2003441 and reverted the subject.
Removing needinfo on Daniel, set needinfo on him on the split bug
Right now, in master branch, if I got it right, the only private things we use from dnf are: dnf.__version__ base._plugins._unload() Marek, what do you think? Should dnf expose these as an official API? Should I open a bug/issue for this? If not, what should we do instead? Thanks.
Yes, please open a bug for it. Dnf currently has several API functions for plugins (init_plugins, pre_configure_plugins, configure_plugins) so it should be possible to add one for unloading them. The `__version__` is currently already marked as an API so you can use it.
Keeping current bug open so that once 2047251 is handled, we can use the replacement provided by it.
Linked PR 35 uses the new unload_plugins if available, otherwise _plugins._unload. I am still waiting for the dnf patch to be included in CentOS Stream 9, for verification, and then will merge 35.
Moving to https://github.com/oVirt/otopi/issues/40