diff options
-rw-r--r-- | client/as-util.c | 6 | ||||
-rw-r--r-- | libappstream-glib/as-app.c | 25 | ||||
-rw-r--r-- | libappstream-glib/as-app.h | 2 |
3 files changed, 33 insertions, 0 deletions
diff --git a/client/as-util.c b/client/as-util.c index 68332e8..1f10845 100644 --- a/client/as-util.c +++ b/client/as-util.c @@ -3510,6 +3510,9 @@ as_util_incorporate (AsUtilPrivate *priv, gchar **values, GError **error) as_util_pad_strings (id, "Incorporating...", align); as_app_subsume_full (app, app_source, AS_APP_SUBSUME_FLAG_NO_OVERWRITE); + + /* good enough for us now */ + as_app_remove_veto (app, "Required AppData"); } /* try to incorporate apps using the package name */ @@ -3533,6 +3536,9 @@ as_util_incorporate (AsUtilPrivate *priv, gchar **values, GError **error) as_util_pad_strings (id, "Incorporating...", align); as_app_subsume_full (app, app_source, AS_APP_SUBSUME_FLAG_NO_OVERWRITE); + + /* good enough for us now */ + as_app_remove_veto (app, "Required AppData"); } /* save new store */ diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 6a3103e..ae9c1f0 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -4740,6 +4740,31 @@ as_app_add_veto (AsApp *app, const gchar *fmt, ...) } /** + * as_app_remove_veto: + * @app: A #AsApp + * @description: veto string + * + * Removes a reason to not include the application in the metadata. + * + * Since: 0.4.1 + **/ +void +as_app_remove_veto (AsApp *app, const gchar *description) +{ + AsAppPrivate *priv = GET_PRIVATE (app); + const gchar *tmp; + guint i; + + for (i = 0; i < priv->vetos->len; i++) { + tmp = g_ptr_array_index (priv->vetos, i); + if (g_strcmp0 (tmp, description) == 0) { + g_ptr_array_remove (priv->vetos, (gpointer) tmp); + break; + } + } +} + +/** * as_app_new: * * Creates a new #AsApp. diff --git a/libappstream-glib/as-app.h b/libappstream-glib/as-app.h index 467be27..c641dac 100644 --- a/libappstream-glib/as-app.h +++ b/libappstream-glib/as-app.h @@ -404,6 +404,8 @@ void as_app_add_veto (AsApp *app, const gchar *fmt, ...) G_GNUC_PRINTF(2,3); +void as_app_remove_veto (AsApp *app, + const gchar *description); guint as_app_search_matches_all (AsApp *app, gchar **search); guint as_app_search_matches (AsApp *app, |