From e6702161da0a24e9d1be9cdb409cb6bc603bf662 Mon Sep 17 00:00:00 2001 From: Phaedrus Leeds Date: Wed, 17 Nov 2021 10:33:15 -0800 Subject: [PATCH] app: Don't use polkit agent in history command There's no need to use polkit in the history command, so don't start the agent in flatpak-main.c. This means we can avoid a test failure in test-history.sh which was caused by old versions of valgrind being unaware of syscall sched_getattr, which is used in g_bus_get_sync(), itself called by install_polkit_agent(). --- app/flatpak-main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/flatpak-main.c b/app/flatpak-main.c index b2a4b14e..88e9d5af 100644 --- a/app/flatpak-main.c +++ b/app/flatpak-main.c @@ -827,10 +827,11 @@ flatpak_run (int argc, check_environment (); /* Don't talk to dbus in enter, as it must be thread-free to setns, also - skip run/build for performance reasons (no need to connect to dbus). */ + skip run/build/history for performance reasons (no need to connect to dbus). */ if (g_strcmp0 (command->name, "enter") != 0 && g_strcmp0 (command->name, "run") != 0 && - g_strcmp0 (command->name, "build") != 0) + g_strcmp0 (command->name, "build") != 0 && + g_strcmp0 (command->name, "history") != 0) polkit_agent = install_polkit_agent (); /* g_vfs_get_default can spawn threads */