[gnome-software: 5/8] plugins: Use GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID for minimal refine flags
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 5/8] plugins: Use GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID for minimal refine flags
- Date: Wed, 8 Dec 2021 08:06:14 +0000 (UTC)
commit d1c0a9b0211af287f1556f8256dae502d60df493
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Dec 6 18:09:04 2021 +0000
plugins: Use GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID for minimal refine flags
Instead of using `GS_PLUGIN_REFINE_FLAGS_DEFAULT`, which actually means
‘no refine flags’.
This makes it clear these jobs do intend for a refine to happen.
`GS_PLUGIN_REFINE_FLAGS_DEFAULT` needs to mean ‘no refine’ for when it’s
used as `refine-flags` for non-refine plugin jobs.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1472
Helps: #1324
lib/gs-appstream.c | 2 +-
plugins/flatpak/gs-flatpak.c | 2 +-
plugins/flatpak/gs-plugin-flatpak.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
index 2a311cf9d..e7edc9bb5 100644
--- a/lib/gs-appstream.c
+++ b/lib/gs-appstream.c
@@ -24,7 +24,7 @@ gs_appstream_create_app (GsPlugin *plugin, XbSilo *silo, XbNode *component, GErr
/* refine enough to get the unique ID */
if (!gs_appstream_refine_app (plugin, app_new, silo, component,
- GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID,
error))
return NULL;
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index b4844f1d4..4e40e441a 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -3390,7 +3390,7 @@ gs_flatpak_file_to_app_bundle (GsFlatpak *self,
if (appstream_gz != NULL) {
if (!gs_flatpak_refine_appstream_from_bytes (self, app, NULL, NULL,
appstream_gz,
- GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID,
cancellable, error))
return NULL;
} else {
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index d8bebd4be..f2f4945da 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -1001,14 +1001,14 @@ gs_plugin_app_remove (GsPlugin *plugin,
return FALSE;
}
if (!gs_flatpak_refine_app (flatpak, app,
- GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID,
cancellable, error)) {
g_prefix_error (error, "failed to run refine for %s: ", ref);
gs_flatpak_error_convert (error);
return FALSE;
}
- gs_flatpak_refine_addons (flatpak, app, GS_PLUGIN_REFINE_FLAGS_DEFAULT, GS_APP_STATE_REMOVING,
cancellable);
+ gs_flatpak_refine_addons (flatpak, app, GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID, GS_APP_STATE_REMOVING,
cancellable);
return TRUE;
}
@@ -1197,7 +1197,7 @@ gs_plugin_app_install (GsPlugin *plugin,
return FALSE;
}
if (!gs_flatpak_refine_app (flatpak, app,
- GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID,
cancellable, error)) {
g_prefix_error (error, "failed to run refine for %s: ",
gs_app_get_unique_id (app));
@@ -1205,7 +1205,7 @@ gs_plugin_app_install (GsPlugin *plugin,
return FALSE;
}
- gs_flatpak_refine_addons (flatpak, app, GS_PLUGIN_REFINE_FLAGS_DEFAULT, GS_APP_STATE_INSTALLING,
cancellable);
+ gs_flatpak_refine_addons (flatpak, app, GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID, GS_APP_STATE_INSTALLING,
cancellable);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]