-
Notifications
You must be signed in to change notification settings - Fork 87
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
Support repo's Appstream data download and install #1844
base: main
Are you sure you want to change the base?
Conversation
c067fd1
to
a261aa3
Compare
Hrm, the CI either needs to add |
a261aa3
to
10f8055
Compare
We do not want AppStream data being downloaded by default, as it's quite huge, so only callers that can do something with that data should request it. |
It's not that you (the caller) only can work with it, the Appstream data is installed system wide (to /var/cache/swcatalog/...), where any Appstream-capable app can use it. Preparing it beforehand makes sense, no? Or do you mean, in the "we" distro, when there's no gnome-software nor KDE Discover, there's also no PacakgeKit (which downloads and installs the appstream data unconditionally)? Note these are only the GUI apps I know of, which consume the appstream data. The |
I looked around, and please correct me if I'm wrong, because I can be wrong, it seems to me the CI is located in a separate project, in the https://github.com/rpm-software-management/ci-dnf-stack . I looked briefly into it, but I realized it's a blackbox for me, I even do not see the build parameters to be applied there. I'm sorry. |
Right, If PackageKit-DNF5 or GNOME Software through dnf5daemon want it, they can ask for it to be downloaded. But the regular dnf5 and dnf5daemon CLI can't do anything with it, so it's not useful to download. |
Repositories can provide Appstream data for the packages they contain. This Appstream data is consumed by applications like the GNOME Software or KDE Discover, thus the users can see the packages (apps) in them. This is to be in pair with PackageKit, which does download and install the repo's Appstream data. As this adds a dependency on the `appstream` library, there is also a CMake option WITH_APPSTREAM to be able to turn the support off. The support is enabled by default. Closes rpm-software-management#1564
10f8055
to
bdaa04d
Compare
While I agree, I also do not think it would be helpful. It's the same as if you would want from the PackageKit to not download and install the appstream data from the repository metadata - it cannot be done. This is better than PackageKit, because with dnf and PackageKit on one machine you've duplicated the repo data in the local cache, which is bad (no PackageKit => half repo data stored on the machine). Could you point me to a repo, which provides that large appstream data, please? I've been in an impression that the distros provide its appstream data in certain packages, not as the repo metadata. Fedora has Is it possible we are talking about different things? |
If the |
I agree with @Conan-Kudo, I really don't think we should download it by default.
I don't think this would be a problem, by default we already download just In my option this could fit well into the |
Yes, it is located in Though I think we should discuss if it should be a dependency of libdnf, that is if the install should be done by libdnf. This is related to the other comments but since libdnf is not using the metadata it would make more sense to me if the install was done by the client that requested it. |
Okay. In that case I'd need access to the metadata itself from the client (through the dnf5daemon). Either to the Alternatively, a new API to list provided metadata by respective repo, then a new API to download chosen types, which would result in a list of full path names for the places where it had been downloaded. Ideally allow download in bulk, a list of the types to be downloaded resulting in a list of the filenames. Alternatively, anything you think would be better and would work for you. Let me know which it is, please, and I can try to update the merge request accordingly, or pass it to someone whom knows the internals of the dnf5 better than me (I know basically nothing). Thanks in advance. |
I was thinking the client would just add something like This would probably needed additional work to handle the fact that its multiple files with unknown type with prefix This is just my idea, I will bring it up on our team meeting today. |
That would work for me. It's close to the second suggestion, but not exactly the same. |
Maybe, to not need from the libdnf to decide whether it's prefix/suffix/wildcard/regex/..., to just list downloaded (or all) metadata types from the repomd.xml file, which the caller can "filter" as it needs to and then it'll ask for the paths to those interesting to it. |
Repositories can provide Appstream data for the packages they contain. This Appstream data is consumed by applications like gnome-software or KDE Discover, thus the users can see the packages (apps) in them.
This is to be in pair with PackageKit, which does download and install the repo's Appstream data.
As this adds a dependency on the
appstream
library, there is also a CMake option WITH_APPSTREAM to be able to turn the support off. The support is enabled by default.That is, the
/var/cache/libdnf5/$REPO_NAME/repodata/
directory can have downloaded also files withappstream
in their name and, when installed, the data is stored under/var/cache/swcatalog/xml/
.CC @m-blaha @jan-kolarik