Opened 17 years ago

Closed 8 years ago

Last modified 8 years ago

#14774 closed defect (duplicate)

launchctl load instructions incomplete

Reported by: dershow Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.6.0
Keywords: dbus update launchctl Cc: ryandesign (Ryan Carsten Schmidt), cooljeanius (Eric Gallager)
Port:

Description

I did an upgrade to dbus (from 1.0.2_2 to 1.1.20_0) and when doing an upgrade or install dbus says:

###########################################################
# A startup item has been generated that will aid in
# starting dbus with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.dbus.plist
###########################################################

However, that will not work correctly if you already have dbus installed and running. And it seems that the upgrade, without doing the install, will cause a bunch of continuous errors in the console logs.

The solution that seems to have worked for me (and should be added to the upgrade instructions) is to do the upgrade, then to unload the old version (and remove the pid file, or the new one won't start), then load the new version:

sudo port upgrade dbus
sudo launchctl unload /Library/LaunchDaemons/org.macports.dbus.plist
sudo rm /opt/local/var/run/dbus/pid
sudo launchctl load -w /Library/LaunchDaemons/org.macports.dbus.plist

Change History (7)

comment:1 Changed 17 years ago by jmroot (Joshua Root)

Milestone: Port Bugs

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Component: portsbase
Milestone: Port BugsMacPorts Future
Priority: LowNormal
Summary: Update of dbus instructions wronglaunchctl load instructions wrong

The message is coming from MacPorts base, not from the dbus port.

I think the correct course of action is to unload the old plist, then upgrade the port, then load the new plist.

We have aliases "sudo port load portname" and "sudo port unload portname". The instructions should show these instead of the more complicated form.

MacPorts should check if a port's plist is loaded when upgrading, and if so, should unload the plist before deactivating the old port, and should load the new plist after activating the new port.

comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Eh, it looks like the dbus port is special and does have its own copy of this message. Still, it's a global problem that needs to be resolved in base, and dbus can duplicate whatever strategy base uses.

comment:4 in reply to:  2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: launchctl load instructions wronglaunchctl load instructions incomplete

Replying to ryandesign@…:

We have aliases "sudo port load portname" and "sudo port unload portname". The instructions should show these instead of the more complicated form.

This was fixed in r62893.

MacPorts should check if a port's plist is loaded when upgrading, and if so, should unload the plist before deactivating the old port, and should load the new plist after activating the new port.

This is requested in #23677.

comment:5 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:6 Changed 8 years ago by raimue (Rainer Müller)

Resolution: duplicate
Status: newclosed

Duplicate of #23677.

comment:7 Changed 8 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future
Note: See TracTickets for help on using tickets.