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.3.4.2 -r1.3.4.3
--- openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 4 Apr 2003 02:25:24 -0000 1.3.4.2
+++ openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 5 Apr 2003 02:09:05 -0000 1.3.4.3
@@ -60,7 +60,7 @@
ns_write ""
- # Now mount the application bundle if the install.xml file was found.
+ # Now process the application bundle if an install.xml file was found.
if { [nsv_exists acs_application node] } {
@@ -82,25 +82,53 @@
install {
- set install_spec_files [glob -nocomplain "[acs_root_dir]/packages/[apm_required_attribute_value $action package]/*.info"]
+ set install_spec_files [list]
+ foreach install_spec_file \
+ [glob -nocomplain "[acs_root_dir]/packages/[apm_required_attribute_value $action package]/*.info"] {
+ if { [catch { array set package [apm_read_package_info_file $install_spec_file] } errmsg] } {
+ # Unable to parse specification file.
+ ns_log Error "$install_spec_file could not be parsed correctly. The error: $errmsg"
+ ns_write "
install: $install_spec_file could not be parsed correctly. The error: $errmsg"
+ return
+ }
+ if { [apm_package_supports_rdbms_p -package_key $package(package.key)] &&
+ ![apm_package_installed_p $package(package.key)] } {
+ lappend install_spec_files $install_spec_file
+ }
+ }
set pkg_info_list [list]
foreach spec_file [glob -nocomplain "[acs_root_dir]/packages/*/*.info"] {
# Get package info, and find out if this is a package we should install
if { [catch { array set package [apm_read_package_info_file $spec_file] } errmsg] } {
# Unable to parse specification file.
ns_log Error "$spec_file could not be parsed correctly. The error: $errmsg"
+ ns_write "
install: $spec_file could not be parsed correctly. The error: $errmsg"
+ return
}
-
- # Save the package info, we may need it for dependency satisfaction later
- lappend pkg_info_list [pkg_info_new $package(package.key) $spec_file \
- $package(provides) $package(requires) ""]
+
+ if { [apm_package_supports_rdbms_p -package_key $package(package.key)] &&
+ ![apm_package_installed_p $package(package.key)] } {
+ # Save the package info, we may need it for dependency satisfaction later
+ lappend pkg_info_list [pkg_info_new $package(package.key) $spec_file \
+ $package(provides) $package(requires) ""]
+ }
}
- set dependency_results [apm_dependency_check -pkg_info_all $pkg_info_list $install_spec_files]
-
- if { [lindex $dependency_results 0] == 1 } {
- apm_packages_full_install -callback apm_ns_write_callback [lindex $dependency_results 1]
+ if { [llength $install_spec_files] > 0 } {
+ set dependency_results [apm_dependency_check -pkg_info_all $pkg_info_list $install_spec_files]
+ if { [lindex $dependency_results 0] == 1 } {
+ apm_packages_full_install -callback apm_ns_write_callback [lindex $dependency_results 1]
+ } else {
+ foreach package_spec [lindex $dependency_results 1] {
+ if { [string is false [pkg_info_dependency_p $package_spec]] } {
+ ns_log Error "install: package \"[pkg_info_key $package_spec]\"[join [pkg_info_comment $package_spec] ","]"
+ append html "
Package \"[pkg_info_key $package_spec]\"\n