-
Notifications
You must be signed in to change notification settings - Fork 125
RepoSack: New API to reload system repo #1702
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
base: main
Are you sure you want to change the base?
Conversation
Introduce a new API to clear all solvables from the system repo and reload fresh data from the RPM database. Re-creating the Base object can be resource-intensive, and there is a use case in dnfdaemon where the current session (which wraps around the Base instance) needs to be reused even after executing an RPM transaction - whether for queries or running another transaction.
It does make me feel uneasy. It basically invalidates the pool right? Libsolv If I understand correctly for example existing |
|
Yes, that's right. Any place that keeps an id of an installed package is invalid after this call. |
| } | ||
|
|
||
| void SolvRepo::empty() { | ||
| // TODO(mblaha): is resuseid=true safe enough? |
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.
Code from libsolv:
if (reuseids && repo->end == pool->nsolvables)
{
/* it's ok to reuse the ids. As this is the last repo, we can
just shrink the solvable array */
It looks like reuseids works only when the repo is last. DNF places the system repo first. Behind it are available repos. The system repo is last only if it is the only one (we don't have available repos loaded).
Note:
OK. Maybe after the first reload the system repository will be the last one.
|
You are introducing a new API method When we sort packages and they have the same nevra, the solvable In general we are getting into the untested area of using libsolv. |
We would like to switch to exclusively using Packit for building and testing pull requests, so we are retiring this GitHub Action workflow. We will want to configure Packit to check that DNF5 compiles with both GCC and clang, like the Package Build action did. In order to fully disable the action, this commit must be applied on each branch in the upstream DNF5 repository. Otherwise, the action might be triggered by a pull request to some stale branch.
Introduce a new API to clear all solvables from the system repo and
reload fresh data from the RPM database.
Re-creating the Base object can be resource-intensive, and there is a
use case in dnfdaemon where the current session (which wraps around the
Base instance) needs to be reused even after executing an RPM
transaction - whether for queries or running another transaction.
For: #1653