Checking if local repository is sane with python bindings #1946
-
I'm trying to rewrite Fedora Bodhi's repository sanity check using python-libdnf5 bindings. Python docs and tutorial are not really clear to me, so I've wrote this:
The question is: using I also thought it would be nice to check if the loaded repository is actually
but that returns an empty string... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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.
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
It is because the repository doesn't have a It reflects the repo file structure:
|
Beta Was this translation helpful? Give feedback.
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.
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 ofsetup
.It is because the repository doesn't have a
name
set. To set …