Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnf5daemon: Update internal state on repo enable/disable #2070

Open
mcrha opened this issue Feb 17, 2025 · 1 comment
Open

dnf5daemon: Update internal state on repo enable/disable #2070

mcrha opened this issue Feb 17, 2025 · 1 comment
Assignees
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@mcrha
Copy link
Contributor

mcrha commented Feb 17, 2025

One can enable/disable repo by calling org.rpm.dnf.v0.rpm.Repo::enable and org.rpm.dnf.v0.rpm.Repo::disable D-Bus functions. The problem is when done, the following org.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 the list, 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.

@ppisar ppisar added Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Feb 18, 2025
@ppisar
Copy link
Contributor

ppisar commented Feb 18, 2025

I agree that the D-Bus daemon should reflect in-session changes and make them effective inside the session.

@m-blaha m-blaha self-assigned this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

3 participants