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):
%3 acs_mail_lite::after_upgrade acs_mail_lite::after_upgrade (private) apm_upgrade_logic apm_upgrade_logic acs_mail_lite::after_upgrade->apm_upgrade_logic auth::after_upgrade auth::after_upgrade (private) auth::after_upgrade->apm_upgrade_logic bug_tracker::install::package_upgrade bug_tracker::install::package_upgrade (private) bug_tracker::install::package_upgrade->apm_upgrade_logic calendar::apm::package_after_upgrade calendar::apm::package_after_upgrade (private) calendar::apm::package_after_upgrade->apm_upgrade_logic calendar::install::package_upgrade calendar::install::package_upgrade (private) calendar::install::package_upgrade->apm_upgrade_logic apm_version_names_compare apm_version_names_compare (public) apm_upgrade_logic->apm_version_names_compare

Testcases:
No testcase defined.
[ show source ]
Show another procedure: