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().
This commit is contained in:
Phaedrus Leeds
2021-11-17 10:33:15 -08:00
committed by Phaedrus Leeds
parent dfda3f09ec
commit e6702161da

View File

@@ -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 */