rpm-software-management / dnf5

Next-generation RPM package management system
Other
222 stars 76 forks source link

Provide appstream related data from repomd.xml #1564

Open mcrha opened 3 weeks ago

mcrha commented 3 weeks ago

The repomd.xml can contain various data files. The dnf5 does not provide the appstream-related files, which means that apps consuming this appstream data cannot propose the apps provided by those repos.

For example on Fedora, there is enabled by default /etc/yum.repos.d/rpmfusion-nonfree-steam.repo, which contains in its /var/cache/dnf/rpmfusion-nonfree-steam-41ce205f970a18bf/repodata/repomd.xml:

...
  <data type="appstream">
    <checksum type="sha256">61dc198f3df4aa1a4aa5c9ec43e0d340075a178115d0b7016d84abc63bc1d8d2</checksum>
    <location href="repodata/appstream.xml"/>
    <timestamp>1717760437</timestamp>
    <size>5450</size>
  </data>
  <data type="appstream-icons">
    <checksum type="sha256">8e5f0aa4d1e4ed769b5f1019c4561679362673c0e467f2fac9394375a0056ed5</checksum>
    <location href="repodata/appstream-icons.tar"/>
    <timestamp>1717760437</timestamp>
    <size>9216</size>
  </data>
  <data type="appstream-ignore">
    <checksum type="sha256">0475d42ede24af6aaf12b69053b11b804bb24e957cd853b88471192893a05825</checksum>
    <location href="repodata/appstream-ignore.xml"/>
    <timestamp>1717760437</timestamp>
    <size>208</size>
  </data>
...

where the appstream-ignore can be, well, ignored, but the other two should be provided in the places where the others can find them, just as the PackageKit does.

This is what PackageKit's dnf backend does with the appstream data from the repomd.xml:
https://github.com/PackageKit/PackageKit/blob/29f59afb2f6482d092493758d9e4d6d8d95faf8f/backends/dnf/pk-backend-dnf-common.c#L90

and as it uses appstream library for the management the clashing is out of your hands (luckily, I guess).

ppisar commented 3 weeks ago

Plugins can be provided by a third party. I.e. Packagekit can provide its own plugin for DNF5.

Or des your report mean that DNF5 does not provide any function for retriving repomd files by a type (like libdnf's dnf_repo_get_filename_md())?

mcrha commented 3 weeks ago

My main point here is once PackageKit is gone, the dnf5 will be "responsible" to provide the appstream data from the repos. Thus "Packagekit can provide its own plugin for DNF5" is not a viable option here.

Conan-Kudo commented 3 weeks ago

It would be needed for the PackageKit DNF5 backend anyway. We need a way to force fetching that repodata type, and currently we cannot, since it's not a recognized extra type.