From 3fca1584ff2dce226ee3409dd9a00f48da80864d Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 11 May 2017 12:27:36 +0200 Subject: [PATCH] remote-ls: Don't rely on active symlink value, use deploy data We want to tweak the active symlink value so we can't rely on this being exactly the commit id. --- app/flatpak-builtins-ls-remote.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/flatpak-builtins-ls-remote.c b/app/flatpak-builtins-ls-remote.c index fe98e6eb..a1f83fa0 100644 --- a/app/flatpak-builtins-ls-remote.c +++ b/app/flatpak-builtins-ls-remote.c @@ -134,13 +134,12 @@ flatpak_builtin_ls_remote (int argc, char **argv, GCancellable *cancellable, GEr if (opt_only_updates) { - g_autofree char *deployed = NULL; + g_autoptr(GVariant) deploy_data = flatpak_dir_get_deploy_data (dir, ref, cancellable, NULL); - deployed = flatpak_dir_read_active (dir, ref, cancellable); - if (deployed == NULL) + if (deploy_data == NULL) continue; - if (g_strcmp0 (deployed, checksum) == 0) + if (g_strcmp0 (flatpak_deploy_data_get_commit (deploy_data), checksum) == 0) continue; }