-
Kalev Lember authored
When parsing system installed appstream data for packages we usually have one appstream file that covers multiple repos (e.g. /usr/share/app-info/xmls/fedora.xml.gz and "fedora", "updates", "updates-testing" repos). In this case, when parsing the appstream we can't set app origin based on the appstream origin as there is no one-to-one mapping from appstream origin to the repo where the package actually comes from. For flatpaks, however, we always have per-remote appstream data and we need to keep track of the origin to match the correct app from the correct remote. If we don't do that then we end up refining flatpak apps with the first entry that appstream finds, which may be from a wrong remote. This is harmless when only one repo provides each flatpak app, but as soon as we have two (e.g. Flathub and Fedora) we need to make sure to match the correct appstream entry with the correct flatpak. This regressed in commit d3648252 that took out the origin adding in gs_appstream_create_app(). This commit now adds it back and makes it work again for the new libxmlb parsing code. Partially fixes: #547
73f3f421