gnome-software/0003-rpm-ostree-download-si...

39 lines
1.8 KiB
Diff

From 823f49dc59eb1a6a00c80084a8ac37782df124fa Mon Sep 17 00:00:00 2001
Date: Mon, 26 Sep 2022 15:11:25 +0200
Subject: [PATCH] rpm-ostree: Mark apps as downloaded
There was a typo in the changes of the gs_app_set_size_download() API,
the `0` meant the app is downloaded, not that the size is unknown.
With this fixed, the Updates page offers to `Restart & Update`, instead
of `Download`, which does nothing, because the rpm-stree plugin
does not implement corresponding GsPlugin function.
---
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index 6984ff95b..1b4f758da 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -749,7 +749,7 @@ app_from_modified_pkg_variant (GsPlugin *plugin, GVariant *variant)
gs_app_set_management_plugin (app, plugin);
gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
app_set_rpm_ostree_packaging_format (app);
- gs_app_set_size_download (app, GS_SIZE_TYPE_UNKNOWN, 0);
+ gs_app_set_size_download (app, GS_SIZE_TYPE_VALID, 0);
gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
@@ -788,7 +788,7 @@ app_from_single_pkg_variant (GsPlugin *plugin, GVariant *variant, gboolean addit
gs_app_set_management_plugin (app, plugin);
gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
app_set_rpm_ostree_packaging_format (app);
- gs_app_set_size_download (app, GS_SIZE_TYPE_UNKNOWN, 0);
+ gs_app_set_size_download (app, GS_SIZE_TYPE_VALID, 0);
gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
--
GitLab