-
Notifications
You must be signed in to change notification settings - Fork 90
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
daemon: API to reset the session.base instance #1757
Conversation
This interface was dropped.
- fix return code in case of error - add full_nevra to expected resolve() output
It's currently used to prevent running Goal.do_transaction call multiple times simultaneously.
This change allow us to easily re-create the session goal object in case of the base reset.
For resetting the base held in the session we will need to execute this part of initialization on two places. This patch prevents code duplication.
This call will re-create libdnf5::Base instance stored in the session. As a result, the goal and transaction are reset as well.
9441746
to
d1a90ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for nicely separating the work into commits! BTW, it might be helpful to add a test case for resetting the session and running a new transaction afterward. What do you think?
Since resolve() method re-sets transaction, use transaction mutex to prevent running Goal.resolve() if another transaction is running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unit test implementation is deferred to a separate issue as it's not easy and straightforward with the daemon testing...
This allows dnf5daemon users to reset their session and re-use it for another transaction.
For: #1653