diff options
author | Alexander Larsson <alexl@redhat.com> | 2019-10-01 13:06:22 +0200 |
---|---|---|
committer | Alexander Larsson <alexander.larsson@gmail.com> | 2019-10-02 14:57:11 +0200 |
commit | 1eb68628bac9ec06be93ab9b7e209d1ebc198d63 (patch) | |
tree | b5d2cc3be29ee12f2c016738934c7f82b5d2fefd /portal | |
parent | ea67fd8bb058c8f73d3774c0c3540c4ed983b382 (diff) | |
download | flatpak-1eb68628bac9ec06be93ab9b7e209d1ebc198d63.tar.gz |
update-portal: Don't report updates for masked refs
Diffstat (limited to 'portal')
-rw-r--r-- | portal/flatpak-portal.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/portal/flatpak-portal.c b/portal/flatpak-portal.c index e477dffe..aaa83405 100644 --- a/portal/flatpak-portal.c +++ b/portal/flatpak-portal.c @@ -1029,6 +1029,8 @@ check_for_updates (PortalFlatpakUpdateMonitor *monitor) const char *local_commit = NULL; const char *remote_commit; g_autoptr(GError) error = NULL; + g_autoptr(FlatpakDir) dir = NULL; + g_autofree char *ref = NULL; installation_path = update_monitor_get_installation_path (monitor); @@ -1051,6 +1053,14 @@ check_for_updates (PortalFlatpakUpdateMonitor *monitor) return; /* Never report updates for uninstalled refs */ } + dir = flatpak_installation_get_dir (installation, NULL); + if (dir == NULL) + return; + + ref = flatpak_ref_format_ref (FLATPAK_REF (installed_ref)); + if (flatpak_dir_ref_is_masked (dir, ref)) + return; /* Never report updates for masked refs */ + local_commit = flatpak_ref_get_commit (FLATPAK_REF (installed_ref)); origin = flatpak_installed_ref_get_origin (installed_ref); |