Commit 8c87d393 authored by Kalev Lember's avatar Kalev Lember

appstream: Set appstream origin as GsApp origin-appstream, not origin

Origin is supposed to be the repo name where packages come from. This
does not always match with appstream metadata origin 1:1; e.g. in Fedora
we have one single appstream source that covers all of standard repos.

Instead of having the appstream and packagekit plugins fight over the
origin field, this commit moves appstream origin to a separate field.

https://bugzilla.redhat.com/show_bug.cgi?id=1440331
parent c5e6ae5d
Pipeline #4583 passed with stage
in 5 minutes and 6 seconds
......@@ -49,6 +49,9 @@ gs_appstream_create_app (GsPlugin *plugin, AsApp *item, GError **error)
if (app == NULL) {
app = gs_app_new (NULL);
gs_app_set_from_unique_id (app, unique_id);
/* clear origin set from unique_id: appstream origin goes to
* GsApp's origin-appstream field instead */
gs_app_set_origin (app, NULL);
gs_app_set_metadata (app, "GnomeSoftware::Creator",
gs_plugin_get_name (plugin));
if (!gs_appstream_refine_app (plugin, app, item, error)) {
......@@ -838,7 +841,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
/* we have an origin in the XML */
if (gs_app_get_origin (app) == NULL &&
gs_appstream_origin_valid (as_app_get_origin (item)))
gs_app_set_origin (app, as_app_get_origin (item));
gs_app_set_origin_appstream (app, as_app_get_origin (item));
/* is there any update information */
if (!gs_appstream_refine_app_updates (plugin, app, item, error))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment