• Joaquim Rocha's avatar
    Change how apps are queued for installation · 22ea48b1
    Joaquim Rocha authored
    When installing an app in g-s while it is offline, g-s was adding it to
    the pending installation queue directly. However, if the app is coming
    from a local source like a local repository (USB drive, test repo, etc.)
    that behavior is not ideal. So it should be up to the plugins whether an
    app installation is performed or queued for later.
    
    To achieve that, this patch changes how the plugin-loader behaves by
    allowing plugins to check the state of the network themselves themselves
    (by introducing a new method gs_plugin_get_available_network), and
    checking the state of apps after calling the gs_plugin_app_install
    methods are called: if the app's state is QUEUED_FOR_INSTALL, then it
    adds the app to the installation queue.
    
    This means that in order to keep supporting this behavior in their
    platforms, plugins need to check whether apps should be queued for
    installation, set the mentioned state to them, and return TRUE (in
    the app install override).
    This patch changes that already for the PackageKit and Flatpak plugins.
    22ea48b1
gs-plugin.h 4.82 KB