apm::process_install_xml (public)

 apm::process_install_xml [ -nested ] [ -install_from_repository ] \
    filename binds

Defined in packages/acs-tcl/tcl/apm-install-procs.tcl

process an XML install definition file which is expected to contain directives to install, mount and configure a series of packages.

Switches:
-nested (optional, boolean)
-install_from_repository (optional, boolean)
Parameters:
filename (required)
path to the XML file relative to serverroot.
binds (required)
list of {variable value variable value ...}
Returns:
list of messages
Author:
Jeff Davis <swiped from acs-bootstrap-installer though>
Created:
2003-10-30

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm::process_install_xml apm::process_install_xml apm_package_install->apm::process_install_xml install::xml::action::source install::xml::action::source (private) install::xml::action::source->apm::process_install_xml apm_attribute_value apm_attribute_value (public) apm::process_install_xml->apm_attribute_value apm_invoke_install_proc apm_invoke_install_proc (public) apm::process_install_xml->apm_invoke_install_proc apm_load_install_xml apm_load_install_xml (private) apm::process_install_xml->apm_load_install_xml apm_package_id_from_key apm_package_id_from_key (public) apm::process_install_xml->apm_package_id_from_key apm_required_attribute_value apm_required_attribute_value (public) apm::process_install_xml->apm_required_attribute_value

Testcases:
No testcase defined.
Source code:
    variable ::install::xml::ids
    # If it's not a nested call then initialize the ids array.
    # If it is nested we will typically need id's from the parent
    if {!$nested_p} {
        unset -nocomplain ids
        # set default ids for the main site and core packages
        set ids(ACS_KERNEL) [apm_package_id_from_key acs-kernel]
        set ids(ACS_TEMPLATING) [apm_package_id_from_key acs-templating]
        set ids(ACS_AUTHENTICATION) [apm_package_id_from_key acs-authentication]
        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]

    set acs_application(name) [apm_required_attribute_value $root_node name]
    set acs_application(pretty_name) [apm_attribute_value -default $acs_application(name) $root_node pretty-name]

    lappend out "Loading packages for the $acs_application(pretty_name) application."

    set actions [xml_node_get_children_by_name $root_node actions]

    if { [llength $actions] != 1 } {
        ns_log Error "Error in \"$filename\": only one action node is allowed, found: [llength $actions]"
        error "Error in \"$filename\": only one action node is allowed"
    }

    set actions [xml_node_get_children [lindex $actions 0]]

    foreach action $actions {
        set install_proc_out [apm_invoke_install_proc -install_from_repository=$install_from_repository_p -node $action]
        lappend out {*}$install_proc_out
    }

    # pop off parse level
    template::util::lpop ::template::parse_level

    return $out
Generic XQL file:
packages/acs-tcl/tcl/apm-install-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-install-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-install-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: