daemon: Honor RPMOSTREE_USE_SESSION_BUS for startup too

While I was debugging the tests, I wanted to run the daemon
interactively under gdb but still on the session.  In our previous
logic this was only possible if we were exec'd by dbus-daemon which
made attaching gdb annoying.

Let's honor the environment variable consistently on client and
server.
This commit is contained in:
Colin Walters 2016-03-07 14:45:01 -05:00
parent c3f1e7c85a
commit d5efcc5a26

View File

@ -361,6 +361,8 @@ main (int argc,
* the system bus. */
if (g_getenv ("DBUS_STARTER_BUS_TYPE") != NULL)
bus_type = G_BUS_TYPE_STARTER;
else if (g_getenv ("RPMOSTREE_USE_SESSION_BUS") != NULL)
bus_type = G_BUS_TYPE_SESSION;
else
bus_type = G_BUS_TYPE_SYSTEM;