Index: openacs-4/packages/acs-bootstrap-installer/installer/install-data-model.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/Attic/install-data-model.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-bootstrap-installer/installer/install-data-model.tcl 8 Jan 2003 18:13:37 -0000 1.6 +++ openacs-4/packages/acs-bootstrap-installer/installer/install-data-model.tcl 15 Feb 2003 23:58:33 -0000 1.7 @@ -28,7 +28,7 @@
 "
 cd [file join [acs_root_dir] packages acs-kernel sql [db_type]]
-db_source_sql_file -callback apm_ns_write_callback "acs-kernel-create.sql"
+db_source_sql_file -callback apm_dummy_callback "acs-kernel-create.sql"
 
 # DRB: Now initialize the APM's table of known database types.  This is
 # butt-ugly.  We could have apm-create.sql do this but that would mean
@@ -60,8 +60,12 @@
 
 "
 
-apm_version_enable -callback apm_ns_write_callback [apm_package_install -callback apm_ns_write_callback "[file join [acs_root_dir] packages acs-kernel acs-kernel.info]"]
+# Some APM procedures use util_memoize, so initialize the cache 
+# before starting APM install
+apm_source "[acs_package_root_dir acs-tcl]/tcl/20-memoize-init.tcl"
 
+apm_version_enable -callback apm_dummy_callback [apm_package_install -callback apm_dummy_callback "[file join [acs_root_dir] packages acs-kernel acs-kernel.info]"]
+
 ns_write "

Loading package .info files - this will take a few minutes. Index: openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/Attic/packages-install.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 31 Jan 2003 16:30:34 -0000 1.5 +++ openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 15 Feb 2003 23:58:33 -0000 1.6 @@ -25,7 +25,7 @@ # Load the acs-tcl init files that might be needed when installing, instantiating and mounting packages # We shouldn't source request-processor-init.tcl as it might interfere with the installer request handler -foreach { init_file } { utilities-init.tcl site-nodes-init.tcl 20-memoize-init.tcl} { +foreach { init_file } { utilities-init.tcl site-nodes-init.tcl } { ns_log Notice "Loading acs-tcl init file $init_file" apm_source "[acs_package_root_dir acs-tcl]/tcl/$init_file" } @@ -37,7 +37,7 @@ set dependency_results [apm_dependency_check -initial_install [apm_scan_packages -new [file join [acs_root_dir] packages]]] set dependencies_satisfied_p [lindex $dependency_results 0] set pkg_list [lindex $dependency_results 1] -apm_packages_full_install -callback apm_ns_write_callback $pkg_list +apm_packages_full_install -callback apm_dummy_callback $pkg_list # Complete the initial install. @@ -47,7 +47,7 @@ # Mount the main site cd [file join [acs_root_dir] packages acs-kernel sql [db_type]] - db_source_sql_file -callback apm_ns_write_callback acs-install.sql + db_source_sql_file -callback apm_dummy_callback acs-install.sql # Make sure the site-node cache is updated with the main site site_node::init_cache Index: openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 29 Jan 2003 15:17:00 -0000 1.11 +++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 15 Feb 2003 23:59:16 -0000 1.12 @@ -449,7 +449,7 @@

Here's an example with named parameters, and namespaces (notice the preferred way of - declaring namespaces and namespaced procedures). Ignore the "\" in "\@param", + declaring namespaces and namespaced procedures). Ignore the '\' in '\@param', I had to use it so the api-browser wouldn't think the parameter docs were for ad_proc itself:

@@ -578,7 +578,8 @@ } - ad_proc -public acs_package_root_dir { package } { - Returns the path root for a particular package within the OpenACS installation. + Returns the path root for a particular package within the OpenACS installation. + For example /web/yourserver/packages/foo, i.e., a full file system path with no ending slash. } - ad_proc -public ad_make_relative_path { path } { Index: openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 22 Jan 2003 15:30:12 -0000 1.11 +++ openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 15 Feb 2003 23:59:16 -0000 1.12 @@ -258,6 +258,8 @@ ad_proc apm_source { __file } { Sources $__file in a clean environment, returning 1 if successful or 0 if not. + Records that the file has been sourced and stores its mtime in the nsv array + apm_library_mtime } { if { ![file exists $__file] } { ns_log "Error" "Unable to source $__file: file does not exist." @@ -271,6 +273,10 @@ return 0 } + set root_dir_len [string length [acs_root_dir]] + set rel_path [string range $__file [expr $root_dir_len + 1] end] + nsv_set apm_library_mtime $rel_path [file mtime $__file] + return 1 } @@ -282,8 +288,8 @@ set relative_path [string range $file \ [expr { [string length "$root_directory/packages"] + 1 }] end] ns_log "Notice" "Loading packages/$relative_path..." + apm_source $file - nsv_set apm_library_mtime packages/$relative_path [file mtime $file] } ad_proc apm_bootstrap_load_libraries {