[gnome-software/290-installing-an-app-its-add-ons-at-the-same-time-doesn-t-update-the-gui-properly] packagekit-refine: Run before the 'appstream' plugin



commit b6efb92c7a19d65df3c00086ac70b2b867f090bf
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 6 18:49:35 2021 +0200

    packagekit-refine: Run before the 'appstream' plugin
    
    The 'appstream' plugin can set an app as installed, even when it had been
    just uninstalled. By running before it the state can be set properly,
    according to what the PackageKit reports.

 plugins/packagekit/gs-plugin-packagekit-refine.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine.c 
b/plugins/packagekit/gs-plugin-packagekit-refine.c
index b2f14df06..0b4548398 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine.c
@@ -58,8 +58,9 @@ gs_plugin_initialize (GsPlugin *plugin)
        pk_client_set_background (priv->client, FALSE);
        pk_client_set_cache_age (priv->client, G_MAXUINT);
 
+       /* appstream can set "installed" state, which might not be accurate */
+       gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_BEFORE, "appstream");
        /* need pkgname and ID */
-       gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_AFTER, "appstream");
        gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_AFTER, "packagekit");
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]