apm_upgrade_logic (public)
apm_upgrade_logic -from_version_name from_version_name \ -to_version_name to_version_name -spec spec
Defined in packages/acs-tcl/tcl/apm-install-procs.tcl
Logic to help upgrade a package. 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.
Example:
ad_proc my_upgrade_callback { {-from_version_name:required} {-to_version_name:required} } { apm_upgrade_logic -from_version_name $from_version_name -to_version_name $to_version_name -spec { 1.1 1.2 { ... } 1.2 1.3 { ... } 1.4d 1.4d1 { ... } 2.1 2.3 { ... } 2.3 2.4 { ... } } }
- Switches:
- -from_version_name (required)
- The version you're upgrading from, e.g. '1.3'.
- -to_version_name (required)
- The version you're upgrading to, e.g. '2.4'.
- -spec (required)
- The code chunks in the format described above
- Author:
- Lars Pind
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.