[MacPorts] #17950: dbus patched with launchd support and version dump

MacPorts noreply at macports.org
Wed Jan 21 14:21:23 PST 2009


#17950: dbus patched with launchd support and version dump
---------------------------------+------------------------------------------
  Reporter:  jonas.baehr@…       |       Owner:  macports-tickets@…                   
      Type:  defect              |      Status:  reopened                             
  Priority:  Normal              |   Milestone:  Port Bugs                            
 Component:  ports               |     Version:  1.7.0                                
Resolution:                      |    Keywords:  launchd kde4 x11                     
      Port:  dbus                |  
---------------------------------+------------------------------------------

Comment(by jonas@…):

 Replying to [comment:60 mta@…]:
 > I did all my testing on a G5 running Leopard.  I assume this crash
 implies that launchd isn't setting the environment variables you need in
 10.4.  Perhaps the lanuchd change needs to be made a Leopard-only feature.
 There were a lot of fixes to launchd in Leopard.

 Yes, I've read everywhere that launch agents have many problems on 10.4
 but without details. Anyway, don't let's give up that fast ;-)
 vinc17, could you please test this patch:
 {{{
 diff --git a/dbus/dbus-server-launchd.c b/dbus/dbus-server-launchd.c
 index 8bf440a..ee8927b 100644
 --- a/dbus/dbus-server-launchd.c
 +++ b/dbus/dbus-server-launchd.c
 @@ -39,6 +39,7 @@
  #include <errno.h>

  #include "dbus-server-socket.h"
 +#include "dbus-sysdeps-unix.h"

  /* put other private launchd functions here */

 @@ -73,7 +74,16 @@ _dbus_server_new_for_launchd (const char
 *launchd_env_var,

    _DBUS_ASSERT_ERROR_IS_CLEAR (error);

 -  if (*launchd_socket_path == '\0')
 +  /* launchd on Mac OS X 10.4 doesn't set the env var for its children
 +   * so we try to get it via launchctl
 +   */
 +  if (launchd_socket_path == NULL)
 +    {
 +      launchd_socket_path = _dbus_lookup_launchd_socket (launchd_env_var,
 error);
 +      if (dbus_error_is_set(error))
 +        return NULL;
 +    }
 +  if (launchd_socket_path == NULL || *launchd_socket_path == '\0')
      {
        dbus_set_error (error, DBUS_ERROR_BAD_ADDRESS,
                        "launchd's environment variable %s is empty, but
 should contain a socket path");
 }}}
 If mta's assumption is true, that should solve your problem.

-- 
Ticket URL: <http://trac.macports.org/ticket/17950#comment:61>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list