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 -N -r1.126.2.25 -r1.126.2.26 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 24 Nov 2022 12:44:18 -0000 1.126.2.25 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 8 Feb 2024 18:43:41 -0000 1.126.2.26 @@ -1942,7 +1942,9 @@ @author Lars Pind } { - return [apm_version_names_compare [lindex [split $from_to_key_1 ","] 0] [lindex [split $from_to_key_2 ","] 0]] + return [apm_version_names_compare \ + [lindex [split $from_to_key_1 ","] 0] \ + [lindex [split $from_to_key_2 ","] 0]] } ad_proc -public apm_upgrade_logic { @@ -1951,9 +1953,14 @@ {-spec:required} } { Logic to help upgrade a package. - The spec contains a list on the form \{ from_version to_version code_chunk from_version to_version code_chunk ... \}. - The list is compared against the from_version_name and to_version_name parameters supplied, and the code_chunks that - fall within the from_version_name and to_version_name it'll get executed in the caller's namespace, ordered by the from_version. + The spec contains a flat list of triples of the form + { "from_version" "to_version" "code_chunk" + "from_version" "to_version" "code_chunk ..." }. + + The list is compared against the "from_version_name" and + "to_version_name" parameters supplied, and the code_chunks that fall + within the from_version_name and to_version_name it'll get + executed in the caller's namespace, ordered by the from_version.

@@ -2005,6 +2012,10 @@ # Check that # from_version_name < elm_from < elm_to < to_version_name + ns_log notice "apm_upgrade_logic: 1 [list apm_version_names_compare $from_version_name $elm_from] => [apm_version_names_compare $from_version_name $elm_from] <= 0 --> [expr {[apm_version_names_compare $from_version_name $elm_from] <= 0}]" + ns_log notice "apm_upgrade_logic: 2 [list apm_version_names_compare $elm_from $elm_to] => [apm_version_names_compare $elm_from $elm_to] <= 0 --> [expr {[apm_version_names_compare $elm_from $elm_to] <= 0}]" + ns_log notice "apm_upgrade_logic: 3 [list apm_version_names_compare $elm_to $to_version_name] => [apm_version_names_compare $elm_to $to_version_name] <= 0 --> [expr {[apm_version_names_compare $elm_to $to_version_name] <= 0}]" + if { [apm_version_names_compare $from_version_name $elm_from] <= 0 && [apm_version_names_compare $elm_from $elm_to] <= 0 && [apm_version_names_compare $elm_to $to_version_name] <= 0 @@ -2290,7 +2301,9 @@ set ids(ACS_LANG) [apm_package_id_from_key acs-lang] set ids(MAIN_SITE) [subsite::main_site_id] } + lappend out "Processing $filename (nested $nested_p)" + lappend ::template::parse_level [info level] set root_node [apm_load_install_xml $filename $binds] @@ -2350,7 +2363,7 @@ } else { set result [::install::xml::${type}::${name} $node] } - return $result + return "install::xml::${type}::${name} $result\n" } ##############