|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Port Upgrade vs Loaded StartupitemsA port I co-maintain (mpd) includes a startupitem section which I keep
loaded using 'launchctl load -w'. Upon updating the port, the old binary is still running in launchd limbo; 'launchctl unload -w' doesn't work properly, so in turn 'launchctl load -w' doesn't work properly either. Are startupitems unloaded during port deactivation? If not, could that step be added to deactivation for ports which do contain startupitems? Ryan Stonecipher-Fisher 573.489.2848 _______________________________________________ macports-dev mailing list macports-dev@... http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev |
|
|
Re: Port Upgrade vs Loaded StartupitemsOn 2009-10-26 09:37, Ryan Stonecipher-Fisher wrote:
> A port I co-maintain (mpd) includes a startupitem section which I keep > loaded using 'launchctl load -w'. > Upon updating the port, the old binary is still running in launchd > limbo; 'launchctl unload -w' doesn't work properly, so in turn > 'launchctl load -w' doesn't work properly either. > Are startupitems unloaded during port deactivation? > If not, could that step be added to deactivation for ports which do > contain startupitems? Sure. As has been mentioned before, the startupitem code needs some love. For bonus points, record both the state of the plist (enabled/disabled) and whether the daemon is actually running (since these aren't necessarily the same), and restore both to their former state after the upgrade completes. - Josh _______________________________________________ macports-dev mailing list macports-dev@... http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev |
|
|
Re: Port Upgrade vs Loaded StartupitemsOn Oct 25, 2009, at 19:49, Joshua Root wrote: > On 2009-10-26 09:37, Ryan Stonecipher-Fisher wrote: >> A port I co-maintain (mpd) includes a startupitem section which I >> keep >> loaded using 'launchctl load -w'. >> Upon updating the port, the old binary is still running in launchd >> limbo; 'launchctl unload -w' doesn't work properly, so in turn >> 'launchctl load -w' doesn't work properly either. >> Are startupitems unloaded during port deactivation? >> If not, could that step be added to deactivation for ports which do >> contain startupitems? > > Sure. As has been mentioned before, the startupitem code needs some > love. Would be a good idea. That was half of my motivation for introducing "port load" and "port unload" -- so that we could hook into them at activate and deactivate time. But we never did that. > For bonus points, record both the state of the plist (enabled/ > disabled) > and whether the daemon is actually running (since these aren't > necessarily the same), and restore both to their former state after > the > upgrade completes. Currently, we always install a plist that says the service is stopped. If you had the service running when you upgraded the port, this is now wrong. So we could either keep track of the state, and write the correct state into the new plist when we install it, or we could just ensure the service is always stopped when a port is deactivated -- either by automatically calling port unload, or by telling the user to do so. _______________________________________________ macports-dev mailing list macports-dev@... http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev |
| Free embeddable forum powered by Nabble | Forum Help |