I am working on auto-mount feature discussed in this thread:
https://openacs.org/forums/message-view?message_id=70889
and I'm having some problems figuring out what the preferred way of creating a package instance and mounting it in the site map is.
It turns out that currently, OpenACS has at least three approaches to doing this:
1. apm_package_instantiate_and_mount Only used in acs-bootstrap-installer/installer/auto-install.tcl Does not update cache, does not invoke callbacks. I've removed this proc (not committed yet).
2. subsite::auto_mount_application, that invokes site_node_mount_application, that invokes site_node_apm_integration::new_site_node_and_package. This seems to do the right things (takes care of cache and callbacks). This proc will also make sure the name of the node to mount the instance is unique. This proc is only invoked on the auto-mount page in the subsite admin UI. As far as I can tell this page is nowhere linked to in the system.
3. site_node_create_package_instance. A deprecated proc that seems to do exactly what the procs 2 above do. The proc is used on the package-new page in the site-map admin UI and this page is actually used. So as it turns out this last deprecated proc (that fortunately seems to do the right thing) is the only one that most people ever use.
What I propose is removing procs 2 altogether and to make auto-install.tcl (proc 1) use proc 3. We can enhance the argument handling of site_node_create_package_instance so that all you must provide is the package_key. We would also undeprecate the proc and move it into the site_node:: namespage.
What do you think?