-
Notifications
You must be signed in to change notification settings - Fork 423
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
Document base initialization for API users including reading config and variables #2219
Comments
I think you miss loading repository configurations in your example. You need to add
Without it, there are no repositories available (except for the "system repo" loaded from the rpmdb), thus no upgrades available. |
Thanks, the first time I try : ...
base = dnf.Base()
base.read_all_repos()
base.fill_sack()
... I have some error missing file in cache ...
base = dnf.Base()
base.read_all_repos()
base.fill_sack(load_system_repo=True, load_available_repos=True)
... With this, it's works as expected. |
I have some error in repo file : mirrorlist line finish with $rltype
When I make |
Regarding the And regarding the "error" in the repo file - you need to read the variable definitions (then DNF would correctly substitute the
I guess the DNF API usage should be better documented... |
Thank you, it's working with
Could you please add this code to the example in the documentation? |
Hello,
I work with "Rocky Linux 9.0 (Blue Onyx)", python 3.9.10 and dnf 4.10.0
I make a plugin for dnf, and it's work an expected
Partial output :
When I want to make a python script for the same thing, he doesn't work
The list of pkg update are empty on the same server
When I try
i = q.installed()
in place ofi = q.upgrades()
, I have the list of installed package.The text was updated successfully, but these errors were encountered: