Forum .LRN Q&A: Re: Packages disabled by default

Collapse
Posted by Peter Marklund on
Ola, concerning APM enhancements there have been a few lately, such as:
  • The APM will automatically suggest all dependencies of a package for installation. This means you don't need to know all the services needed by the applications you are interested, the APM takes care of such dependencies for you.
  • You no longer need to restart the server after installation. Tcl libraries and init files are sourced by the APM. One thing to watch out for here is that -init.tcl files will be sourced multiple times (once per Tcl interpreter) so they need to be able to deal with that.
  • The APM can auto mount packages at a certain URL (such as /notifications for the notifications package).
  • You can specify callbacks for your package. Available callback types are: after-install, after-instantiate, after-mount, before-unmount, before-uninstantiate, and before-uninstall. The APM UI will throw an error if the specified callback Tcl proc doesn't exist or doesn't have the right argument switches. I added the argument switch checking while writing this post as I realized that arguments required are nowhere documented and non-obvious.