[gnome-software/fix-flatpak-related-progress: 5/11] flatpak: Set extensions to updatable properly
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/fix-flatpak-related-progress: 5/11] flatpak: Set extensions to updatable properly
- Date: Fri, 10 Jul 2020 04:10:58 +0000 (UTC)
commit 1c2c85ec8a53bdf56b2a6af9301b0c77a43ff083
Author: Matthew Leeds <matthew leeds endlessm com>
Date: Thu Jul 9 14:34:22 2020 -0700
flatpak: Set extensions to updatable properly
This avoids the warning "State change on
user/flatpak/test/runtime/org.test.Chiron.Extension/master from
installed to installing is not OK", by setting the extension to
updatable when it is, even though this won't be reflected in the UI (the
state on the main app will be).
I have also seen this warning when updating an extension for real, not
just in the unit tests.
plugins/flatpak/gs-flatpak.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index d4805a9d..0d22e04c 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1501,6 +1501,11 @@ gs_flatpak_add_updates (GsFlatpak *self, GsAppList *list,
if (gs_app_get_state (main_app) != AS_APP_STATE_INSTALLING)
gs_app_set_state (main_app, AS_APP_STATE_UPDATABLE_LIVE);
+ /* set updatable state on the extension too, as it will have
+ * its state updated to installing then installed later on */
+ if (gs_app_get_state (app) != AS_APP_STATE_INSTALLING)
+ gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+
/* already downloaded */
if (g_strcmp0 (commit, latest_commit) != 0) {
g_debug ("%s has a downloaded update %s->%s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]