Bug 2124511 - [dnf5] Add dedicated function to refresh metadata
Summary: [dnf5] Add dedicated function to refresh metadata
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: libdnf
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-06 11:47 UTC by Milan Crha
Modified: 2023-07-25 10:30 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-702 0 None None None 2023-01-10 11:01:12 UTC

Description Milan Crha 2022-09-06 11:47:10 UTC
The gnome-software has a dedicated function to refresh metadata, it's usually ran on start of the application, but can be also executed when needed. The function takes one argument, the `cache_age` in seconds. Caches not being that old are automatically skipped for the refresh. An explicit refresh can help to speed up execution of the following commands, the same as when the refresh happens during the dedicated time it's much better experience for the users.

A side note: the first time I ran the dnf5daemon-server and connected to it to list installed packages the dnf5daemon-server realized it has no/stale cache and begun to refresh the repository information. I have installed quite few repos, thus it took longer to download all the repo information. It took as much as the D-Bus call timed out. That led me to set unlimited time for the D-Bus calls to the dnf5daemon-server to avoid any such problem in the future.

Comment 1 Ben Cotton 2023-02-07 14:54:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 2 Martin Pitt 2023-07-24 05:03:19 UTC
I just tested dnfdaemon again in https://issues.redhat.com/browse/COCKPIT-952 , and am happy to report that all crashes that I previously ran into now got fixed, thanks! So this missing API is the remaining gap which blocks us from moving to dnfdaemon in Cockpit.

Comment 3 Milan Crha 2023-07-25 10:30:33 UTC
It seems the 5.1.0 has `read_all_repos` method on the `org.rpm.dnf.v0.Base` interface. It does not contain the "cache_age" argument (in fact it has no argument at all), but if it's the way to go, then why not.

I think this can be closed, unless someone is willing to add the "cache_age" argument.


Note You need to log in before you can comment on or make changes to this bug.