Using a recursive mainloop for the default context is a bad idea in general, but it's absolutely wrong when the methods are called from a different thread, as many sources installed on the default context (such as all of Gdk/Gtk) expect to be called only from the primary thread.
Created attachment 76609 [details] [review]
lib: don't use the default main context in sync PkClient methods
Hmm, this breaks make check. It just hangs.