You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a small issue with the recent pull-request that I submitted (ec3cbde) (which was merged, thank you!).
The first time the daemon is accessed everything works. Plugins are loaded, variables in repo urls are populated, everything's good. If the daemon is accessed a second time, plugins are not loaded, variables are not substituted. When I enable debug logging, I can see that the plugins fail to load: "Failed to init plugins: load_plugins() called twice".
In dnfdaemon, the dnf.Base object is "reset" after a transaction and it looks like that is not compatible with plugins. However, I do see that the reset is necessary to get updated state. e.g. if you install a package the current dnf.Base thinks the package is not installed.
As per the dnf documentation, it is assumed that the dnf.Base object lives for the length of the program's life and there is further implication that plugins get a reference to this Base object:
For now, I can force the daemon to exit before every transaction, but this is not ideal. I fear a more formal solution would require a bit of a refactoring, but hopefully there's a simple fix.
The text was updated successfully, but these errors were encountered:
Well, this is embarrassing.
There is a small issue with the recent pull-request that I submitted (ec3cbde) (which was merged, thank you!).
The first time the daemon is accessed everything works. Plugins are loaded, variables in repo urls are populated, everything's good. If the daemon is accessed a second time, plugins are not loaded, variables are not substituted. When I enable debug logging, I can see that the plugins fail to load: "Failed to init plugins: load_plugins() called twice".
In dnfdaemon, the dnf.Base object is "reset" after a transaction and it looks like that is not compatible with plugins. However, I do see that the reset is necessary to get updated state. e.g. if you install a package the current dnf.Base thinks the package is not installed.
As per the dnf documentation, it is assumed that the dnf.Base object lives for the length of the program's life and there is further implication that plugins get a reference to this Base object:
https://dnf.readthedocs.io/en/latest/api_base.html
For now, I can force the daemon to exit before every transaction, but this is not ideal. I fear a more formal solution would require a bit of a refactoring, but hopefully there's a simple fix.
The text was updated successfully, but these errors were encountered: