Index: openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 7 Aug 2017 23:47:45 -0000 1.20 +++ openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 3 Sep 2024 15:37:29 -0000 1.21 @@ -7,7 +7,7 @@ @cvs-id $Id$ } { {sql_file:multiple ""} - {mount_packages:multiple ""} + {mount_packages:multiple ""} {mount_path:array ""} } @@ -24,7 +24,7 @@ ns_write [subst {
" - continue + ns_write "[ns_quotehtml $errmsg]
" + continue } set package_key $version(package.key) if {[apm_package_version_installed_p $package_key $version(name)] } { - #ns_log notice "===== ALREADY installed $package_key" - # Already installed. - continue + #ns_log notice "===== ALREADY installed $package_key" + # Already installed. + continue } set version_files $version(files) set data_model_files [list] # Find the correct data model files for this package. foreach file $sql_files { - if {[lindex $file 2] eq $package_key } { - # Pass on the file path and its type. - lappend data_model_files $file - } + if {[lindex $file 2] eq $package_key } { + # Pass on the file path and its type. + lappend data_model_files $file + } } # Mount path of package if { $package_key in $mount_packages - && [info exists mount_path($package_key)] - && $mount_path($package_key) ne "" + && [info exists mount_path($package_key)] + && $mount_path($package_key) ne "" } { set selected_mount_path $mount_path($package_key) } else { @@ -87,32 +87,33 @@ set enable_p 1 if {[catch { - ns_log notice "===== INSTALL $package_key" - set version_id [apm_package_install \ - -enable=$enable_p \ - -package_path $package_path \ - -callback apm_ns_write_callback \ - -load_data_model \ - -data_model_files $data_model_files \ - -mount_path $selected_mount_path \ - $spec_file] - ns_log notice "===== INSTALL $package_key DONE" + ns_log notice "===== INSTALL $package_key" + set version_id [apm_package_install \ + -enable=$enable_p \ + -package_path $package_path \ + -callback apm_ns_write_callback \ + -load_data_model \ + -data_model_files $data_model_files \ + -mount_path $selected_mount_path \ + $spec_file] + ns_log notice "===== INSTALL $package_key DONE" } errorMsg]} { - ns_write "Error: $errorMsg\n" - ns_write [ns_quotehtml $::errorInfo] - set version_id 0 + ns_write "Error: $errorMsg[ns_quotehtml $errmsg]
" + ns_write [ns_quotehtml $::errorInfo] + ns_write "\n" + set version_id 0 } if { $version_id == 0 } { # Installation of the package failed and we shouldn't continue with installation # as there might be packages depending on the failed package. Ideally we should # probably check for such dependencies and continue if there are none. ns_write [subst { -
+ + All packages in this directory have already been installed. + Please return to the index.
} } else { ns_write {
- Done installing packages. -
You should restart the server now to make installed and upgraded packages available.
+ Done installing packages. +You should restart the server now to make installed and upgraded packages available.
Click here to restart the server now.
} } ns_write [subst { - + }] # Local variables: