Index: openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 25 Sep 2003 10:47:55 -0000 1.9 +++ openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 30 Sep 2003 16:29:51 -0000 1.10 @@ -47,14 +47,18 @@ # Find out which script is appropriate to be run. set data_model_in_package 0 set table_rows "" - set data_model_files [concat \ - [apm_data_model_scripts_find \ + set data_model_files [apm_data_model_scripts_find \ -upgrade_from_version_name $initial_version_name \ -upgrade_to_version_name $final_version_name \ -package_path $package_path \ - $package_key] \ - [apm_ctl_files_find $package_key]] + $package_key] + if { !$upgrade_p } { + # Assuming here that ctl_file files are not upgrade scripts + # TODO: Make it possible to determine which ctl files are upgrade scripts and which aren't + set data_model_files [concat $data_model_files [apm_ctl_files_find $package_key]] + } + set sql_file_list [concat $sql_file_list $data_model_files] if {![empty_string_p $data_model_files]} { 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.55 -r1.56 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 30 Sep 2003 12:10:03 -0000 1.55 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 30 Sep 2003 16:29:51 -0000 1.56 @@ -786,21 +786,17 @@ " db_source_sqlj_file -callback $callback "$path/$file_path" apm_callback_and_log $callback "\n" - } - } - - set data_files [apm_ctl_files_find $package_key] - foreach item $data_files { - set file_path [lindex $item 0] - ns_log Debug "APM: Now processing $file_path of type ctl_file" - if { !$ul_p } { - apm_callback_and_log $callback "
" + db_load_sql_data -callback $callback $path/$file_path + apm_callback_and_log $callback "\n" } - apm_callback_and_log $callback "
\n" } if {$ul_p} {" - db_load_sql_data -callback $callback $path/$file_path - apm_callback_and_log $callback "