summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-store.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-10-24 15:21:36 +0100
committerRichard Hughes <richard@hughsie.com>2014-10-24 15:23:06 +0100
commit820333a5afe18f792c2a0b89a6b640f6f2960f6b (patch)
tree83381b5ba31feebe81e053c9acea438123885e6c /libappstream-glib/as-store.c
parentde66f11378a974c05927f6fc11fa822b24d45589 (diff)
downloadappstream-glib-820333a5afe18f792c2a0b89a6b640f6f2960f6b.tar.gz
Add as_app_set_origin()
This allows us to get the origin the package was read from in the instance we have more than one resource being loaded into the store.
Diffstat (limited to 'libappstream-glib/as-store.c')
-rw-r--r--libappstream-glib/as-store.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index 6c547cf..9eaed70 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -640,6 +640,7 @@ as_store_from_root (AsStore *store,
error_local->message);
return FALSE;
}
+ as_app_set_origin (app, priv->origin);
as_store_add_app (store, app);
}
@@ -658,6 +659,7 @@ as_store_load_yaml_file (AsStore *store,
GCancellable *cancellable,
GError **error)
{
+ AsStorePrivate *priv = GET_PRIVATE (store);
GNode *app_n;
GNode *n;
const gchar *tmp;
@@ -690,6 +692,7 @@ as_store_load_yaml_file (AsStore *store,
app = as_app_new ();
if (!as_app_node_parse_dep11 (app, app_n, error))
return FALSE;
+ as_app_set_origin (app, priv->origin);
if (as_app_get_id (app) != NULL)
as_store_add_app (store, app);
}