Index: openacs-4/packages/acs-bootstrap-installer/bootstrap.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/bootstrap.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-bootstrap-installer/bootstrap.tcl 30 Jan 2003 14:10:42 -0000 1.20 +++ openacs-4/packages/acs-bootstrap-installer/bootstrap.tcl 31 Jan 2003 16:30:12 -0000 1.21 @@ -139,11 +139,6 @@ bootstrap_fatal_error "The request processor routines have not been loaded." } - # Instantiate and mount core packages if not already done - if { ![ad_acs_admin_node] } { - apm_mount_core_packages - } - ns_log "Notice" "Done loading OpenACS." }] Index: openacs-4/packages/acs-bootstrap-installer/installer.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-bootstrap-installer/installer.tcl 18 Sep 2002 11:56:46 -0000 1.6 +++ openacs-4/packages/acs-bootstrap-installer/installer.tcl 31 Jan 2003 16:30:12 -0000 1.7 @@ -172,6 +172,22 @@ } +proc install_redefine_ad_conn {} { + + # Peter Marklund + # We need to be able to invoke ad_conn in the installer. However + # We cannot use the rp_filter that sets up ad_conn + proc ad_conn {attribute} { + if { [string equal $attribute "-connected_p"] } { + set return_value 1 + } elseif { [catch {set return_value [ns_conn $attribute] } error] } { + set return_value "" + } + + return $return_value + } +} + ad_proc -public ad_windows_p {} { # DLB - this used to check the existence of the WINDIR environment # variable, rather than just asking AOLserver. 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.4 -r1.5 --- openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 30 Jan 2003 14:10:55 -0000 1.4 +++ openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 31 Jan 2003 16:30:34 -0000 1.5 @@ -16,13 +16,23 @@ where package_key = 'acs-kernel' } -default 0] } else { - return 0 + return 0 } } ns_write "[install_header 200 "Installing OpenACS Core Services"] " +# 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} { + ns_log Notice "Loading acs-tcl init file $init_file" + apm_source "[acs_package_root_dir acs-tcl]/tcl/$init_file" +} +apm_bootstrap_load_libraries -procs acs-subsite +apm_bootstrap_load_queries acs-subsite +install_redefine_ad_conn + # Attempt to install all packages. 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] @@ -31,13 +41,26 @@ # Complete the initial install. -ns_write "
+if { ![ad_acs_admin_node] } { + ns_write "
" + # 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 + # Make sure the site-node cache is updated with the main site + site_node::init_cache + + # We need to redefine ad_conn again since apm_package_install resourced the real ad_conn + install_redefine_ad_conn + + # Mount and set permissions for core packages + apm_mount_core_packages + + ns_write "" +} + ns_write "All Packages Installed." ns_write "" -cd [file join [acs_root_dir] packages acs-kernel sql [db_type]] -db_source_sql_file -callback apm_ns_write_callback acs-install.sql -ns_write "
Generating secret tokens..."