[MacPorts] #17950: dbus patched with launchd support and version dump
MacPorts
noreply at macports.org
Fri Jan 16 15:11:34 PST 2009
#17950: dbus patched with launchd support and version dump
---------------------------------+------------------------------------------
Reporter: jonas.baehr@… | Owner: macports-tickets@…
Type: enhancement | Status: reopened
Priority: Normal | Milestone: Port Enhancements
Component: ports | Version: 1.7.0
Resolution: | Keywords: launchd kde4 x11
Port: dbus |
---------------------------------+------------------------------------------
Comment(by mta@…):
Replying to [comment:39 jonas.baehr@…]:
> The code you mention is to spawn a server (a dbus-daemon instance), not
to get the bus address from within the client. gconfd-2 is a dbus client
though. Look at init_session_address in dbus-bus.c to find the behaviour I
described. A platform-specific look-up is only performed is
DBUS_SESSION_BUS_ADDRESS is not set.
Yes, I realize that. The server that is spawned then has to find a socket
to talk to the dbus that spawned it. This is the code that is
constructing the value for the environment variable that will be used by
the spawned server (gconfd-2) to find this socket. I think this is what
you are saying too.
>
> I'm not sure which is the best approach to fix it. In fact, launchd: is
not a real address type, but rather an address lookup method. So, with
this in mind it might be a solution to pass the real unix:path=/foo
address to _dbus_server_new_for_socket (in dbus-server-launchd.c).
However, something like this
{{{
DBUS_SESSION_BUS_ADDRESS="launchd:key=session" dbus-monitor
}}}
> won't work with it... (That's exactly the problem gconfd-2 has, when
autolaunched by dbus-daemon)
> The question is now if we want launchd to behave like a real address
type, or if it's just a lookup/pseudo-adress only valid in a server config
file.
>
> Since it does not make sense to lookup the same address again I'd say
one should set the server's address to unix:path instead of reconstructing
the original launchd address, which is then used again in the client to
lookup the socket. This doesn't feel right and should fix our gconfd-2
problem (every autolaunched service, in fact). Accepting launchd:
addresses in DBUS_SESSION_BUS_ADDRESS can be a second step.
I agree that something like this is probably the best solution. I suppose
you could do both, change the address passed to spawned clients and also
accept a launchd: address passed back, but this doesn't seem either
necessary or right.
--
Ticket URL: <http://trac.macports.org/ticket/17950#comment:41>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list