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.19 -r1.19.2.1 --- openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 19 Jun 2015 19:51:16 -0000 1.19 +++ openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 9 Sep 2015 14:18:29 -0000 1.19.2.1 @@ -96,11 +96,6 @@ -data_model_files $data_model_files \ -mount_path $selected_mount_path \ $spec_file] - - if {[file exists $::acs::rootdir/packages/$version(package.key)/install.xml]} { - ns_log notice "===== RUN /packages/$version(package.key)/install.xml" - apm::process_install_xml /packages/$version(package.key)/install.xml "" - } ns_log notice "===== INSTALL $version(package.key) DONE" } errorMsg]} { Index: openacs-4/packages/acs-admin/www/install/install-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/install/install-3.tcl,v diff -u -r1.10 -r1.10.2.1 --- openacs-4/packages/acs-admin/www/install/install-3.tcl 27 Oct 2014 16:38:56 -0000 1.10 +++ openacs-4/packages/acs-admin/www/install/install-3.tcl 9 Sep 2015 14:18:29 -0000 1.10.2.1 @@ -141,7 +141,8 @@
Installing $package_key ...
}]
- # Install the packages -- this actually copies the files into the
+
+ # Install the package -- this actually copies the files into the
# right place in the file system and backs up any old files
set version_id [apm_package_install \
-enable \
@@ -155,11 +156,6 @@
# as there might be packages depending on the failed package. Ideally we should
# probably check for such dependencies and continue if there are none.
set success_p 0
- } elseif {[file exists $::acs::rootdir/packages/$package_key/install.xml]} {
- ns_write "... configure $package_key
\n"
- #ns_log notice "===== RUN /packages/$package_key/install.xml"
- apm::process_install_xml /packages/$package_key/install.xml ""
- ns_write "... installation OK
\n"
} else {
ns_write "... installation OK
\n"
}
Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v
diff -u -r1.109.2.3 -r1.109.2.4
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 6 Sep 2015 09:14:52 -0000 1.109.2.3
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 9 Sep 2015 14:18:29 -0000 1.109.2.4
@@ -124,7 +124,10 @@
}
}
-ad_proc -private pkg_info_new { package_key spec_file_path embeds extends provides requires {dependency_p ""} {comment ""}} {
+ad_proc -private pkg_info_new {
+ package_key spec_file_path embeds extends provides requires
+ {dependency_p ""} {comment ""}
+} {
Returns a datastructure that maintains information about a package.
@param package_key The key of the package.
@@ -767,12 +770,18 @@
array set version [apm_read_package_info_file $spec_file_path]
set package_key $version(package.key)
- apm_callback_and_log $callback "
Installed $version(package-name), version $version(name).
" + + apm_callback_and_log $callback "[lindex $operations 1] $version(package-name), version $version(name).
" } { ns_log Error "apm_package_install: Error installing $version(package-name) version $version(name): $errmsg\n$::errorInfo" @@ -988,6 +997,14 @@ apm_package_instance_new -instance_name $version(package-name) \ -package_key $package_key } + + + if {[file exists $::acs::rootdir/packages/$package_key/install.xml]} { + # Run install.xml only for new installs + ns_log notice "===== RUN /packages/$package_key/install.xml" + apm::process_install_xml /packages/$package_key/install.xml "" + } + } else { # After upgrade Tcl proc callback apm_invoke_callback_proc -version_id $version_id -type after-upgrade \