Skip to content

Checking if local repository is sane with python bindings #1946

Answered by kontura
mattiaverga asked this question in Q&A
Discussion options

You must be logged in to vote

The question is: using load_repos is enough to be sure the created repository is sane?

It will load the repositories so if it doesn't throw the repos are valid. However it doesn't tell you about the contents, whether there are any groups, advisories, packages... or whether package dependencies can be satisfied and stuff like that.

And: I don't see how base_config is applied when running base.setup(), is it?

Yes, for example you can checkout: https://github.com/rpm-software-management/dnf5/blob/main/libdnf5/base/base.cpp#L181-L212 where it uses the config right at the beginning of setup.

but that returns an empty string...

It is because the repository doesn't have a name set. To set …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattiaverga
Comment options

Answer selected by mattiaverga
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants