dnf5daemon: Update internal state on repo enable/disable #2070
Labels
Priority: MEDIUM
Triaged
Someone on the DNF 5 team has read the issue and determined the next steps to take
One can enable/disable repo by calling
org.rpm.dnf.v0.rpm.Repo::enable
andorg.rpm.dnf.v0.rpm.Repo::disable
D-Bus functions. The problem is when done, the followingorg.rpm.dnf.v0.rpm.Repo::list
call on the same session on which the enable/disable was done reports the repos in the previous state, not in the current state - verified in the/etc/yum.repos.d/...
that the enable/disable happened; alternatively open a new session and call thelist
, which will show the current state of the repo.The API user can call
org.rpm.dnf.v0.Base::reset
, but it's a big hammer and unnecessary, considering the code knows which repos changed, thus it can/should also update the state in the memory of the session which did it, not only change the data in the file.Live updates in any opened session (file changed=>update its internal structure data in memory) would be a very nice benefit, maybe with a new signal on the
org.rpm.dnf.v0.rpm.Repo
interface like "changed(repo_name, changed_repo_attrs)", a nice-to-have, but I agree it's much more work than just updating the enabled/disabled flag in the in-memory data structure.The text was updated successfully, but these errors were encountered: