apm-install-procs.tcl

Routines used for installing packages.

Location:
packages/acs-tcl/tcl/apm-install-procs.tcl
Created:
September 11 2000
Author:
Bryan Quinn <bquinn@arsdigita.com>
CVS Identification:
$Id: apm-install-procs.tcl,v 1.132 2024/10/09 14:42:06 antoniop Exp $

Procedures in this file

Detailed information

apm::package_version::attributes::default_value (public)

 apm::package_version::attributes::default_value attribute_name

Return the default value for the given attribute name.

Parameters:
attribute_name (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::default_value apm::package_version::attributes::default_value apm::package_version::attributes::get_spec->apm::package_version::attributes::default_value apm::package_version::attributes::parse_xml apm::package_version::attributes::parse_xml (private) apm::package_version::attributes::parse_xml->apm::package_version::attributes::default_value packages/acs-admin/www/apm/version-edit.tcl packages/acs-admin/ www/apm/version-edit.tcl packages/acs-admin/www/apm/version-edit.tcl->apm::package_version::attributes::default_value

Testcases:
No testcase defined.

apm::package_version::attributes::generate_xml (private)

 apm::package_version::attributes::generate_xml -version_id version_id \
    [ -indentation indentation ]

Return an XML string with the dynamic package version attributes for a certain package version.

Switches:
-version_id (required)
The id of the package version to generate the attribute XML for.
-indentation (optional)
A string with whitespace to indent each tag with
Authors:
Peter Marklund
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 apm_generate_package_spec apm_generate_package_spec (public) apm::package_version::attributes::generate_xml apm::package_version::attributes::generate_xml apm_generate_package_spec->apm::package_version::attributes::generate_xml apm::package_version::attributes::get apm::package_version::attributes::get (public) apm::package_version::attributes::generate_xml->apm::package_version::attributes::get apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::generate_xml->apm::package_version::attributes::get_spec

Testcases:
No testcase defined.

apm::package_version::attributes::generate_xml_element (private)

 apm::package_version::attributes::generate_xml_element \
    [ -indentation indentation ] -element_name element_name \
    [ -attribute_name attribute_name ] [ -multiple ] -value value

Format an XML element with a value depending on the specified arguments

Switches:
-indentation (optional)
-element_name (required)
-attribute_name (optional)
code the value as XML attribute
-multiple (optional, boolean, defaults to "false")
treat the value as a list and produce multiple XML elements
-value (required)
Returns:
the XML-formatted string
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::generate_xml_element apm::package_version::attributes::generate_xml_element apm::package_version::attributes::get_spec->apm::package_version::attributes::generate_xml_element

Testcases:
No testcase defined.

apm::package_version::attributes::get (public)

 apm::package_version::attributes::get -version_id version_id \
    -array array

Set an array with the attribute values of a certain package version.

Switches:
-version_id (required)
The id of the package version to return attribute values for
-array (required)
The name of an array in the callers environment in which the attribute values will be set (with attribute names as keys and attribute values as values).
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm::package_version::attributes::generate_xml apm::package_version::attributes::generate_xml (private) apm::package_version::attributes::get apm::package_version::attributes::get apm::package_version::attributes::generate_xml->apm::package_version::attributes::get apm::package_version::attributes::get_instance_name apm::package_version::attributes::get_instance_name (private) apm::package_version::attributes::get_instance_name->apm::package_version::attributes::get packages/acs-admin/www/apm/version-edit.tcl packages/acs-admin/ www/apm/version-edit.tcl packages/acs-admin/www/apm/version-edit.tcl->apm::package_version::attributes::get packages/acs-admin/www/apm/version-view.tcl packages/acs-admin/ www/apm/version-view.tcl packages/acs-admin/www/apm/version-view.tcl->apm::package_version::attributes::get db_foreach db_foreach (public) apm::package_version::attributes::get->db_foreach

Testcases:
No testcase defined.

apm::package_version::attributes::get_instance_name (private)

 apm::package_version::attributes::get_instance_name package_key

Return the package_instance_name which is used for naming instances in .LRN, every time that we are creating a class.

Parameters:
package_key (required)
Author:
Cesar Hernandez

Partial Call Graph (max 5 caller/called nodes):
%3 apm::package_version::attributes::set_all_instances_names apm::package_version::attributes::set_all_instances_names (private) apm::package_version::attributes::get_instance_name apm::package_version::attributes::get_instance_name apm::package_version::attributes::set_all_instances_names->apm::package_version::attributes::get_instance_name apm_package_instance_new apm_package_instance_new (public) apm_package_instance_new->apm::package_version::attributes::get_instance_name apm::package_version::attributes::get apm::package_version::attributes::get (public) apm::package_version::attributes::get_instance_name->apm::package_version::attributes::get apm_version_id_from_package_key apm_version_id_from_package_key (public) apm::package_version::attributes::get_instance_name->apm_version_id_from_package_key

Testcases:
No testcase defined.

apm::package_version::attributes::get_pretty_name (public)

 apm::package_version::attributes::get_pretty_name attribute_name

Return the pretty name of attribute with given short name.

Parameters:
attribute_name (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/install/install.tcl packages/acs-admin/ www/install/install.tcl apm::package_version::attributes::get_pretty_name apm::package_version::attributes::get_pretty_name packages/acs-admin/www/install/install.tcl->apm::package_version::attributes::get_pretty_name apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::get_pretty_name->apm::package_version::attributes::get_spec

Testcases:
No testcase defined.

apm::package_version::attributes::get_spec (public)

 apm::package_version::attributes::get_spec

Return dynamic attributes of package versions in an array list. The rationale for introducing the dynamic package version attributes is to make it easy to add new package attributes.

Returns:
An array list with attribute names as keys and attribute specs as values. The attribute specs are themselves array lists with keys default_value, validation_proc, and pretty_name.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm::package_version::attributes::default_value apm::package_version::attributes::default_value (public) apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec apm::package_version::attributes::default_value->apm::package_version::attributes::get_spec apm::package_version::attributes::generate_xml apm::package_version::attributes::generate_xml (private) apm::package_version::attributes::generate_xml->apm::package_version::attributes::get_spec apm::package_version::attributes::get_pretty_name apm::package_version::attributes::get_pretty_name (public) apm::package_version::attributes::get_pretty_name->apm::package_version::attributes::get_spec apm::package_version::attributes::parse_xml apm::package_version::attributes::parse_xml (private) apm::package_version::attributes::parse_xml->apm::package_version::attributes::get_spec apm::package_version::attributes::store apm::package_version::attributes::store (private) apm::package_version::attributes::store->apm::package_version::attributes::get_spec apm::package_version::attributes::generate_xml_element apm::package_version::attributes::generate_xml_element (private) apm::package_version::attributes::get_spec->apm::package_version::attributes::generate_xml_element

Testcases:
No testcase defined.

apm::package_version::attributes::maturity_int_to_text (public)

 apm::package_version::attributes::maturity_int_to_text maturity

Get the internationalized maturity description corresponding to the given integer package maturity level.

Parameters:
maturity (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm_read_package_info_file apm_read_package_info_file (public) apm::package_version::attributes::maturity_int_to_text apm::package_version::attributes::maturity_int_to_text apm_read_package_info_file->apm::package_version::attributes::maturity_int_to_text packages/acs-admin/www/install/install.tcl packages/acs-admin/ www/install/install.tcl packages/acs-admin/www/install/install.tcl->apm::package_version::attributes::maturity_int_to_text lang::util::localize lang::util::localize (public) apm::package_version::attributes::maturity_int_to_text->lang::util::localize

Testcases:
No testcase defined.

apm::package_version::attributes::parse_xml (private)

 apm::package_version::attributes::parse_xml -parent_node parent_node \
    -array array

Given the parent node in an XML tree parse the package version attributes and set their values with upvar in the array with given name.

Switches:
-parent_node (required)
A reference to the parent XML node of the attribute nodes
-array (required)
The name of the array in the callers scope to set the attribute values in.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm_get_package_repository apm_get_package_repository (public) apm::package_version::attributes::parse_xml apm::package_version::attributes::parse_xml apm_get_package_repository->apm::package_version::attributes::parse_xml apm_read_package_info_file apm_read_package_info_file (public) apm_read_package_info_file->apm::package_version::attributes::parse_xml apm::package_version::attributes::default_value apm::package_version::attributes::default_value (public) apm::package_version::attributes::parse_xml->apm::package_version::attributes::default_value apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::parse_xml->apm::package_version::attributes::get_spec xml_node_get_content xml_node_get_content (public) apm::package_version::attributes::parse_xml->xml_node_get_content xml_node_get_first_child_by_name xml_node_get_first_child_by_name (public) apm::package_version::attributes::parse_xml->xml_node_get_first_child_by_name

Testcases:
No testcase defined.

apm::package_version::attributes::set_all_instances_names (private)

 apm::package_version::attributes::set_all_instances_names

Set all names of the instances for those packages that have the attribute package_instance_name. After running this script you must restart your installation.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) apm::package_version::attributes::get_instance_name apm::package_version::attributes::get_instance_name (private) apm_package_info_file_path apm_package_info_file_path (public) apm_read_package_info_file apm_read_package_info_file (public) db_dml db_dml (public) apm::package_version::attributes::set_all_instances_names apm::package_version::attributes::set_all_instances_names apm::package_version::attributes::set_all_instances_names->ad_conn apm::package_version::attributes::set_all_instances_names->apm::package_version::attributes::get_instance_name apm::package_version::attributes::set_all_instances_names->apm_package_info_file_path apm::package_version::attributes::set_all_instances_names->apm_read_package_info_file apm::package_version::attributes::set_all_instances_names->db_dml

Testcases:
No testcase defined.

apm::package_version::attributes::store (private)

 apm::package_version::attributes::store -version_id version_id \
    -array array

Store the dynamic attributes of a certain package version in the database.

Switches:
-version_id (required)
The id of the package version to store attribute values for
-array (required)
The name of the array in the callers scope containing the attribute values to store
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install_version apm_package_install_version (public) apm::package_version::attributes::store apm::package_version::attributes::store apm_package_install_version->apm::package_version::attributes::store apm_version_update apm_version_update (public) apm_version_update->apm::package_version::attributes::store apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::store->apm::package_version::attributes::get_spec db_dml db_dml (public) apm::package_version::attributes::store->db_dml db_transaction db_transaction (public) apm::package_version::attributes::store->db_transaction

Testcases:
No testcase defined.

apm::package_version::attributes::validate_maturity (private)

 apm::package_version::attributes::validate_maturity maturity
Parameters:
maturity (required)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

apm::process_install_xml (public)

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

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.

apm_copy_inherited_params (public)

 apm_copy_inherited_params new_package_key dependencies

Copy parameters from a packages ancestors. Called for "embeds" and "extends" dependencies.

Parameters:
new_package_key (required)
dependencies (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_copy_inherited_params apm_copy_inherited_params apm_package_install->apm_copy_inherited_params packages/acs-admin/www/apm/version-dependency-add-2.tcl packages/acs-admin/ www/apm/version-dependency-add-2.tcl packages/acs-admin/www/apm/version-dependency-add-2.tcl->apm_copy_inherited_params db_exec_plsql db_exec_plsql (public) apm_copy_inherited_params->db_exec_plsql db_foreach db_foreach (public) apm_copy_inherited_params->db_foreach

Testcases:
No testcase defined.

apm_copy_param_to_descendents (public)

 apm_copy_param_to_descendents new_package_key parameter_name

Copy a new parameter in a package to its descendents. Called when a package is upgraded or a parameter added in the APM.

Parameters:
new_package_key (required)
parameter_name (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_parameter_register apm_parameter_register (public) apm_copy_param_to_descendents apm_copy_param_to_descendents apm_parameter_register->apm_copy_param_to_descendents db_1row db_1row (public) apm_copy_param_to_descendents->db_1row db_exec_plsql db_exec_plsql (public) apm_copy_param_to_descendents->db_exec_plsql

Testcases:
No testcase defined.

apm_data_model_scripts_find (public)

 apm_data_model_scripts_find \
    [ -upgrade_from_version_name upgrade_from_version_name ] \
    [ -upgrade_to_version_name upgrade_to_version_name ] \
    [ -package_path package_path ] package_key
Switches:
-upgrade_from_version_name (optional)
From which version do we want the files
-upgrade_to_version_name (optional)
To what version do we want the files
-package_path (optional)
The package path
Parameters:
package_key (required)
The package key
Returns:
A list of files and file types of form [list [list "foo.sql" "data_model_upgrade"] ...]

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install_data_model apm_package_install_data_model (private) apm_data_model_scripts_find apm_data_model_scripts_find apm_package_install_data_model->apm_data_model_scripts_find packages/acs-admin/www/apm/packages-install-3.tcl packages/acs-admin/ www/apm/packages-install-3.tcl packages/acs-admin/www/apm/packages-install-3.tcl->apm_data_model_scripts_find packages/acs-admin/www/install/install-3.tcl packages/acs-admin/ www/install/install-3.tcl packages/acs-admin/www/install/install-3.tcl->apm_data_model_scripts_find apm_get_package_files apm_get_package_files (public) apm_data_model_scripts_find->apm_get_package_files apm_guess_db_type apm_guess_db_type (public) apm_data_model_scripts_find->apm_guess_db_type apm_guess_file_type apm_guess_file_type (public) apm_data_model_scripts_find->apm_guess_file_type apm_log apm_log (public) apm_data_model_scripts_find->apm_log apm_order_upgrade_scripts apm_order_upgrade_scripts (private) apm_data_model_scripts_find->apm_order_upgrade_scripts

Testcases:
No testcase defined.

apm_dependency_check (private)

 apm_dependency_check [ -callback callback ] [ -initial_install ] \
    [ -pkg_info_all pkg_info_all ] spec_files

Check dependencies of all the packages provided.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
-initial_install (optional, boolean)
Only process spec files with the initial install attribute.
-pkg_info_all (optional)
If you supply this argument, when a requirement goes unsatisfied, instead of failing, this proc will try to add whatever other packages are needed to the install set. The list of package keys to add will be the third element in the list returned.
Parameters:
spec_files (required)
A list of spec files to be processed.
Returns:
A list whose first element indicates whether dependencies were satisfied (1 if so, 0 otherwise). The second element is the package info list with the packages ordered according to dependencies. Packages that can be installed come first. Any packages that failed the dependency check come last. The third element is a list of package keys on additional packages to install, in order to satisfy dependencies.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_simple_package_install apm_simple_package_install (public) apm_dependency_check apm_dependency_check apm_simple_package_install->apm_dependency_check apm_callback_and_log apm_callback_and_log (public) apm_dependency_check->apm_callback_and_log apm_dependency_provided_p apm_dependency_provided_p (public) apm_dependency_check->apm_dependency_provided_p apm_package_supports_rdbms_p apm_package_supports_rdbms_p (public) apm_dependency_check->apm_package_supports_rdbms_p apm_read_package_info_file apm_read_package_info_file (public) apm_dependency_check->apm_read_package_info_file pkg_info_embeds pkg_info_embeds (private) apm_dependency_check->pkg_info_embeds

Testcases:
No testcase defined.

apm_dependency_check_new (public)

 apm_dependency_check_new -repository_array repository_array \
    -package_keys package_keys

Checks dependencies and finds out which packages are required to install the requested packages. In case some packages cannot be installed due to failed dependencies, it returns which packages out of the requested can be installed, and which packages, either originally requested or required by those, could not be installed, and why.

Switches:
-repository_array (required)
Name of an array in the caller's namespace containing the repository of available packages as returned by apm_get_package_repository.
-package_keys (required)
The list of package_keys of the packages requested to be installed.
Returns:
An array list with the following elements:
  • status: 'ok' or 'failed'.
  • install: If status is 'ok', this is the complete list of packages that need to be installed, in the order in which they need to be installed. If status is 'failed', the list of packages that can be installed.
  • failed: If status is 'failed', an array list keyed by package_key of 2-tuples of (required-uri, required-version) of requirements that could not be satisfied.
  • packages: The list of package_keys of the packages touched upon, either because they were originally requested, or because they were required. If status is 'ok', will be identical to 'install'.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/packages-install-2.tcl packages/acs-admin/ www/apm/packages-install-2.tcl apm_dependency_check_new apm_dependency_check_new packages/acs-admin/www/apm/packages-install-2.tcl->apm_dependency_check_new packages/acs-admin/www/install/install-2.tcl packages/acs-admin/ www/install/install-2.tcl packages/acs-admin/www/install/install-2.tcl->apm_dependency_check_new apm_get_installed_provides apm_get_installed_provides (public) apm_dependency_check_new->apm_get_installed_provides apm_version_names_compare apm_version_names_compare (public) apm_dependency_check_new->apm_version_names_compare

Testcases:
No testcase defined.

apm_dependency_provided_p (public)

 apm_dependency_provided_p [ -dependency_list dependency_list ] \
    dependency_uri dependency_version

Returns 1 if the current system provides the dependency inquired about. Returns -1 if the version number is too low. Returns 0 otherwise.

Switches:
-dependency_list (optional, defaults to "[list]")
Specify this if you want to a check a list of dependencies of form {dependency_name dependency_version} in addition to querying the database for what the system currently provides.
Parameters:
dependency_uri (required)
The dependency that is being checked.
dependency_version (required)
The version of the dependency being checked.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) apm_dependency_provided_p apm_dependency_provided_p apm_dependency_check->apm_dependency_provided_p apm_version_names_compare apm_version_names_compare (public) apm_dependency_provided_p->apm_version_names_compare db_list db_list (public) apm_dependency_provided_p->db_list

Testcases:
No testcase defined.

apm_get_package_repository (public)

 apm_get_package_repository [ -repository_url repository_url ] \
    -array array

Gets a list of packages available for install from either a remote package repository or the local filesystem.

Switches:
-repository_url (optional)
The URL for the repository channel to get from, or the empty string to search the local filesystem instead.
-array (required)
Name of an array where you want the repository stored. It will be keyed by package-key, and each entry will be an array list returned by apm_read_package_info_file.
Author:
Lars Pind <lars@collaboraid.biz>
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/packages-install-2.tcl packages/acs-admin/ www/apm/packages-install-2.tcl apm_get_package_repository apm_get_package_repository packages/acs-admin/www/apm/packages-install-2.tcl->apm_get_package_repository packages/acs-admin/www/install/install-2.tcl packages/acs-admin/ www/install/install-2.tcl packages/acs-admin/www/install/install-2.tcl->apm_get_package_repository packages/acs-admin/www/install/install-3.tcl packages/acs-admin/ www/install/install-3.tcl packages/acs-admin/www/install/install-3.tcl->apm_get_package_repository packages/acs-admin/www/install/install.tcl packages/acs-admin/ www/install/install.tcl packages/acs-admin/www/install/install.tcl->apm_get_package_repository ad_get_client_property ad_get_client_property (public) apm_get_package_repository->ad_get_client_property ad_set_client_property ad_set_client_property (public) apm_get_package_repository->ad_set_client_property ad_try ad_try (public) apm_get_package_repository->ad_try apm::package_version::attributes::parse_xml apm::package_version::attributes::parse_xml (private) apm_get_package_repository->apm::package_version::attributes::parse_xml apm_attribute_value apm_attribute_value (public) apm_get_package_repository->apm_attribute_value

Testcases:
No testcase defined.

apm_get_repository_channel (public)

 apm_get_repository_channel

Returns the channel to use when installing software from the repository. Based on the version of the acs-kernel package, e.g. if acs-kernel is version 5.0.1, then this will return 5-0.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/install/install.tcl packages/acs-admin/ www/install/install.tcl apm_get_repository_channel apm_get_repository_channel packages/acs-admin/www/install/install.tcl->apm_get_repository_channel ad_acs_version ad_acs_version (public) apm_get_repository_channel->ad_acs_version

Testcases:
No testcase defined.

apm_get_repository_channels (public)

 apm_get_repository_channels [ repository_url ]

Returns the channels and URLs from a repository

Parameters:
repository_url (optional, defaults to "https://openacs.org/repository/")

Partial Call Graph (max 5 caller/called nodes):
%3 test_apm_respositories_api apm_respositories_api (test acs-tcl) apm_get_repository_channels apm_get_repository_channels test_apm_respositories_api->apm_get_repository_channels dom dom apm_get_repository_channels->dom util::http::get util::http::get (public) apm_get_repository_channels->util::http::get packages/acs-admin/www/install/install.tcl packages/acs-admin/ www/install/install.tcl packages/acs-admin/www/install/install.tcl->apm_get_repository_channels

Testcases:
apm_respositories_api

apm_invoke_install_proc (public)

 apm_invoke_install_proc [ -install_from_repository ] [ -type type ] \
    -node node

read an XML install element and invoke the appropriate processing procedure.

Switches:
-install_from_repository (optional, boolean)
-type (optional, defaults to "action")
the type of element to search for
-node (required)
the XML node to process
Returns:
the result of the invoked proc
Author:
Lee Denison
Created:
2004-06-16

Partial Call Graph (max 5 caller/called nodes):
%3 apm::process_install_xml apm::process_install_xml (public) apm_invoke_install_proc apm_invoke_install_proc apm::process_install_xml->apm_invoke_install_proc install::xml::action::location install::xml::action::location (public) install::xml::action::location->apm_invoke_install_proc install::xml::action::map-category-tree install::xml::action::map-category-tree (public) install::xml::action::map-category-tree->apm_invoke_install_proc install::xml::action::set-join-policy install::xml::action::set-join-policy (public) install::xml::action::set-join-policy->apm_invoke_install_proc install::xml::action::set-permission install::xml::action::set-permission (public) install::xml::action::set-permission->apm_invoke_install_proc xml_node_get_name xml_node_get_name (public) apm_invoke_install_proc->xml_node_get_name

Testcases:
No testcase defined.

apm_load_catalog_files (private)

 apm_load_catalog_files [ -upgrade ] package_key

Load catalog files for a package that is either installed or upgraded. If the package is upgraded message key upgrade status is reset before loading the files. During installation of OpenACS when the acs-lang package hasn't been installed yet this procedure won't do anything. That's not a problem since catalog files will be loaded upon next server restart. Also caches the messages it loads.

Switches:
-upgrade (optional, boolean)
Parameters:
package_key (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_load_catalog_files apm_load_catalog_files apm_package_install->apm_load_catalog_files apm_package_installed_p apm_package_installed_p (public) apm_load_catalog_files->apm_package_installed_p lang::catalog::import lang::catalog::import (public) apm_load_catalog_files->lang::catalog::import

Testcases:
No testcase defined.

apm_load_install_xml (private)

 apm_load_install_xml filename binds

Loads an install file and returns the root node. errors out if the file is not there. substitutes variables before parsing so you can provide interpolated values.

Parameters:
filename (required)
relative to serverroot, leading slash needed.
binds (required)
list of {variable value variable value ...}
Returns:
root_node of the parsed XML file.
Author:
Jeff Davis davis@xarg.net
Created:
2003-10-30

Partial Call Graph (max 5 caller/called nodes):
%3 apm::process_install_xml apm::process_install_xml (public) apm_load_install_xml apm_load_install_xml apm::process_install_xml->apm_load_install_xml ad_file ad_file (public) apm_load_install_xml->ad_file xml_doc_get_first_node xml_doc_get_first_node (public) apm_load_install_xml->xml_doc_get_first_node xml_parse xml_parse (public) apm_load_install_xml->xml_parse

Testcases:
No testcase defined.

apm_mount_core_packages (private)

 apm_mount_core_packages

Mount, and set permissions for a number of packages part of the OpenACS core. The packages are singletons that have already been instantiated during installation. The main site needs to have been set up prior to invoking this proc.

The reason mounting is done here and not via the auto-mount feature of the APM is that there is a circular dependency between acs-subsite and acs-content-repository. The package acs-subsite requires acs-content-repository and so we cannot install acs-subsite before acs-content-repository in order to be able to mount acs-content-repository.

Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 acs_magic_object acs_magic_object (public) permission::grant permission::grant (public) permission::set_not_inherit permission::set_not_inherit (public) site_node::instantiate_and_mount site_node::instantiate_and_mount (public) apm_mount_core_packages apm_mount_core_packages apm_mount_core_packages->acs_magic_object apm_mount_core_packages->permission::grant apm_mount_core_packages->permission::set_not_inherit apm_mount_core_packages->site_node::instantiate_and_mount

Testcases:
No testcase defined.

apm_order_upgrade_scripts (private)

 apm_order_upgrade_scripts upgrade_script_names

Upgrade scripts are ordered so that they may be executed in a sequence that upgrades package. For example, if you start at version 1.0, and need to go to version 2.0, a correct order would be 1.0-1.5, 1.5-1.6, 1.6-2.0.

Parameters:
upgrade_script_names (required)
Returns:
an ordered list of upgrade script names.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_data_model_scripts_find apm_data_model_scripts_find (public) apm_order_upgrade_scripts apm_order_upgrade_scripts apm_data_model_scripts_find->apm_order_upgrade_scripts

Testcases:
No testcase defined.

apm_package_deinstall (public)

 apm_package_deinstall [ -callback callback ] package_key

Deinstalls a package from the filesystem.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
package_key (required)
The package to be deinstaleled.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/package-deinstall.tcl packages/acs-admin/ www/apm/package-deinstall.tcl apm_package_deinstall apm_package_deinstall packages/acs-admin/www/apm/package-deinstall.tcl->apm_package_deinstall ad_conn ad_conn (public) apm_package_deinstall->ad_conn apm_callback_and_log apm_callback_and_log (public) apm_package_deinstall->apm_callback_and_log apm_package_registered_p apm_package_registered_p (public) apm_package_deinstall->apm_package_registered_p apm_workspace_dir apm_workspace_dir (public) apm_package_deinstall->apm_workspace_dir db_dml db_dml (public) apm_package_deinstall->db_dml

Testcases:
No testcase defined.

apm_package_delete (public)

 apm_package_delete [ -sql_drop_scripts sql_drop_scripts ] \
    [ -callback callback ] [ -remove_files ] [ -delete_site_nodes ] \
    package_key

De-install a package from the system. Will unmount and uninstantiate package instances, invoke any before-uninstall callback, source any provided sql drop scripts, remove message keys, and delete the package from the APM tables.

Switches:
-sql_drop_scripts (optional)
-callback (optional, defaults to "apm_dummy_callback")
-remove_files (optional, boolean)
-delete_site_nodes (optional, boolean)
Parameters:
package_key (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_upgrade upgrade (test acs-lang) apm_package_delete apm_package_delete test_upgrade->apm_package_delete acs::try_cache acs::try_cache (private) apm_package_delete->acs::try_cache acs_package_root_dir acs_package_root_dir (public) apm_package_delete->acs_package_root_dir apm_callback_and_log apm_callback_and_log (public) apm_package_delete->apm_callback_and_log apm_invoke_callback_proc apm_invoke_callback_proc (public) apm_package_delete->apm_invoke_callback_proc apm_package_instance_delete apm_package_instance_delete (public) apm_package_delete->apm_package_instance_delete lang::test::teardown_test_package lang::test::teardown_test_package (private) lang::test::teardown_test_package->apm_package_delete packages/acs-admin/www/apm/package-delete-2.tcl packages/acs-admin/ www/apm/package-delete-2.tcl packages/acs-admin/www/apm/package-delete-2.tcl->apm_package_delete

Testcases:
upgrade

apm_package_install (public)

 apm_package_install [ -enable ] [ -callback callback ] \
    [ -load_data_model ] [ -install_from_repository ] \
    [ -data_model_files data_model_files ] \
    [ -package_path package_path ] [ -mount_path mount_path ] \
    spec_file_path

Registers a new package and/or version in the database, returning the version_id. If $callback is provided, periodically invokes this procedure with a single argument containing a human-readable (English) status message.

Switches:
-enable (optional, boolean)
-callback (optional, defaults to "apm_dummy_callback")
-load_data_model (optional, boolean)
-install_from_repository (optional, boolean)
-data_model_files (optional, defaults to "0")
-package_path (optional)
-mount_path (optional)
Parameters:
spec_file_path (required)
The path to an XML .info file relative to
Returns:
The version_id if successfully installed, 0 otherwise.

Partial Call Graph (max 5 caller/called nodes):
%3 test_upgrade upgrade (test acs-lang) apm_package_install apm_package_install test_upgrade->apm_package_install acs::try_cache acs::try_cache (private) apm_package_install->acs::try_cache acs_package_root_dir acs_package_root_dir (public) apm_package_install->acs_package_root_dir ad_file ad_file (public) apm_package_install->ad_file ad_try ad_try (public) apm_package_install->ad_try apm::process_install_xml apm::process_install_xml (public) apm_package_install->apm::process_install_xml apm_packages_full_install apm_packages_full_install (private) apm_packages_full_install->apm_package_install lang::test::setup_test_package lang::test::setup_test_package (private) lang::test::setup_test_package->apm_package_install packages/acs-admin/www/apm/packages-install-4.tcl packages/acs-admin/ www/apm/packages-install-4.tcl packages/acs-admin/www/apm/packages-install-4.tcl->apm_package_install packages/acs-admin/www/install/install-3.tcl packages/acs-admin/ www/install/install-3.tcl packages/acs-admin/www/install/install-3.tcl->apm_package_install

Testcases:
upgrade

apm_package_install_callbacks (private)

 apm_package_install_callbacks [ -callback callback ] callback_list \
    version_id

Install the Tcl proc callbacks for the package version.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
callback_list (required)
version_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 test_apm__test_callback_get_set apm__test_callback_get_set (test acs-tcl) apm_package_install_callbacks apm_package_install_callbacks test_apm__test_callback_get_set->apm_package_install_callbacks apm_set_callback_proc apm_set_callback_proc (public) apm_package_install_callbacks->apm_set_callback_proc db_dml db_dml (public) apm_package_install_callbacks->db_dml apm_package_install apm_package_install (public) apm_package_install->apm_package_install_callbacks

Testcases:
apm__test_callback_get_set

apm_package_install_data_model (private)

 apm_package_install_data_model [ -callback callback ] \
    [ -upgrade_from_version_name upgrade_from_version_name ] \
    [ -data_model_files data_model_files ] [ -path path ] spec_file

Given a spec file, reads in the data model files to load from it.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
-upgrade_from_version_name (optional)
-data_model_files (optional, defaults to "0")
-path (optional)
Parameters:
spec_file (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_package_install_data_model apm_package_install_data_model apm_package_install->apm_package_install_data_model acs_package_root_dir acs_package_root_dir (public) apm_package_install_data_model->acs_package_root_dir apm_callback_and_log apm_callback_and_log (public) apm_package_install_data_model->apm_callback_and_log apm_data_model_scripts_find apm_data_model_scripts_find (public) apm_package_install_data_model->apm_data_model_scripts_find apm_read_package_info_file apm_read_package_info_file (public) apm_package_install_data_model->apm_read_package_info_file db_bounce_pools db_bounce_pools (public) apm_package_install_data_model->db_bounce_pools

Testcases:
No testcase defined.

apm_package_install_dependencies (private)

 apm_package_install_dependencies [ -callback callback ] embeds extends \
    provides requires version_id

Install all package dependencies.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
embeds (required)
extends (required)
provides (required)
requires (required)
version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_package_install_dependencies apm_package_install_dependencies apm_package_install->apm_package_install_dependencies apm_dependency_add apm_dependency_add (public) apm_package_install_dependencies->apm_dependency_add apm_dependency_remove apm_dependency_remove (public) apm_package_install_dependencies->apm_dependency_remove apm_interface_add apm_interface_add (public) apm_package_install_dependencies->apm_interface_add db_foreach db_foreach (public) apm_package_install_dependencies->db_foreach

Testcases:
No testcase defined.

apm_package_install_owners (public)

 apm_package_install_owners [ -callback callback ] owners version_id

Install all of the owners of the package version.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
owners (required)
version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_upgrade upgrade (test acs-lang) apm_package_install_owners apm_package_install_owners test_upgrade->apm_package_install_owners db_dml db_dml (public) apm_package_install_owners->db_dml apm_package_install apm_package_install (public) apm_package_install->apm_package_install_owners packages/acs-admin/www/apm/package-add-2.tcl packages/acs-admin/ www/apm/package-add-2.tcl packages/acs-admin/www/apm/package-add-2.tcl->apm_package_install_owners packages/acs-admin/www/apm/version-edit-2.tcl packages/acs-admin/ www/apm/version-edit-2.tcl packages/acs-admin/www/apm/version-edit-2.tcl->apm_package_install_owners

Testcases:
upgrade

apm_package_install_owners_prepare (public)

 apm_package_install_owners_prepare owner_names owner_uris

Prepare the owners data structure for installation.

Parameters:
owner_names (required)
owner_uris (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/package-add-2.tcl packages/acs-admin/ www/apm/package-add-2.tcl apm_package_install_owners_prepare apm_package_install_owners_prepare packages/acs-admin/www/apm/package-add-2.tcl->apm_package_install_owners_prepare packages/acs-admin/www/apm/version-edit-2.tcl packages/acs-admin/ www/apm/version-edit-2.tcl packages/acs-admin/www/apm/version-edit-2.tcl->apm_package_install_owners_prepare

Testcases:
No testcase defined.

apm_package_install_parameters (private)

 apm_package_install_parameters [ -callback callback ] parameters \
    package_key

Installs a set of parameters into the package denoted by package_key.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
parameters (required)
package_key (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_package_install_parameters apm_package_install_parameters apm_package_install->apm_package_install_parameters apm_parameter_register apm_parameter_register (public) apm_package_install_parameters->apm_parameter_register

Testcases:
No testcase defined.

apm_package_install_spec (public)

 apm_package_install_spec version_id

Writes the XML-formatted specification for a package to disk, marking it in the database as the only installed version of the package. Creates the package directory if it doesn't already exist. Overwrites any existing specification file; or if none exists yet, creates $package_key/$package_key.info and adds this new file to apm_version_files in the database. Adds minimal directories.

Parameters:
version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/package-add-2.tcl packages/acs-admin/ www/apm/package-add-2.tcl apm_package_install_spec apm_package_install_spec packages/acs-admin/www/apm/package-add-2.tcl->apm_package_install_spec packages/acs-admin/www/apm/package-add.tcl packages/acs-admin/ www/apm/package-add.tcl packages/acs-admin/www/apm/package-add.tcl->apm_package_install_spec packages/acs-admin/www/apm/parameter-add-2.tcl packages/acs-admin/ www/apm/parameter-add-2.tcl packages/acs-admin/www/apm/parameter-add-2.tcl->apm_package_install_spec packages/acs-admin/www/apm/parameter-edit-2.tcl packages/acs-admin/ www/apm/parameter-edit-2.tcl packages/acs-admin/www/apm/parameter-edit-2.tcl->apm_package_install_spec packages/acs-admin/www/apm/version-callback-add-edit.tcl packages/acs-admin/ www/apm/version-callback-add-edit.tcl packages/acs-admin/www/apm/version-callback-add-edit.tcl->apm_package_install_spec acs_package_root_dir acs_package_root_dir (public) apm_package_install_spec->acs_package_root_dir ad_file ad_file (public) apm_package_install_spec->ad_file apm_generate_package_spec apm_generate_package_spec (public) apm_package_install_spec->apm_generate_package_spec apm_version_info apm_version_info (public) apm_package_install_spec->apm_version_info db_1row db_1row (public) apm_package_install_spec->db_1row

Testcases:
No testcase defined.

apm_package_install_version (public)

 apm_package_install_version [ -callback callback ] -array array \
    [ -version_id version_id ] package_key version_name version_uri \
    summary description description_format vendor vendor_uri \
    auto_mount [ release_date ]

Installs a version of a package.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
-array (required)
The name of the array in the callers scope holding package version attributes
-version_id (optional)
Parameters:
package_key (required)
version_name (required)
version_uri (required)
summary (required)
description (required)
description_format (required)
vendor (required)
vendor_uri (required)
auto_mount (required)
release_date (optional)
Returns:
The assigned version id.

Partial Call Graph (max 5 caller/called nodes):
%3 test_upgrade upgrade (test acs-lang) apm_package_install_version apm_package_install_version test_upgrade->apm_package_install_version apm::package_version::attributes::store apm::package_version::attributes::store (private) apm_package_install_version->apm::package_version::attributes::store apm_interface_add apm_interface_add (public) apm_package_install_version->apm_interface_add db_exec_plsql db_exec_plsql (public) apm_package_install_version->db_exec_plsql apm_package_install apm_package_install (public) apm_package_install->apm_package_install_version packages/acs-admin/www/apm/package-add-2.tcl packages/acs-admin/ www/apm/package-add-2.tcl packages/acs-admin/www/apm/package-add-2.tcl->apm_package_install_version

Testcases:
upgrade

apm_package_register (public)

 apm_package_register [ -spec_file_path spec_file_path ] \
    [ -spec_file_mtime spec_file_mtime ] package_key pretty_name \
    pretty_plural package_uri package_type initial_install_p \
    singleton_p implements_subsite_p inherit_templates_p

Register the package in the system.

Switches:
-spec_file_path (optional)
-spec_file_mtime (optional)
Parameters:
package_key (required)
pretty_name (required)
pretty_plural (required)
package_uri (required)
package_type (required)
initial_install_p (required)
singleton_p (required)
implements_subsite_p (required)
inherit_templates_p (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_upgrade upgrade (test acs-lang) apm_package_register apm_package_register test_upgrade->apm_package_register db_exec_plsql db_exec_plsql (public) apm_package_register->db_exec_plsql apm_package_install apm_package_install (public) apm_package_install->apm_package_register packages/acs-admin/www/apm/package-add-2.tcl packages/acs-admin/ www/apm/package-add-2.tcl packages/acs-admin/www/apm/package-add-2.tcl->apm_package_register

Testcases:
upgrade

apm_package_upgrade_from (private)

 apm_package_upgrade_from package_key version_name
Parameters:
package_key (required)
The package you're installing
version_name (required)
The version of the package you're installing
Returns:
the version of the package currently installed, which we're upgrading from, if it's different from the version_name passed in. If this is not an upgrade, returns the empty string.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_package_upgrade_from apm_package_upgrade_from apm_package_install->apm_package_upgrade_from db_string db_string (public) apm_package_upgrade_from->db_string

Testcases:
No testcase defined.

apm_package_upgrade_p (public)

 apm_package_upgrade_p package_key version_name
Parameters:
package_key (required)
version_name (required)
Returns:
1 if a version of the indicated package_key of version lower than version_name is already installed in the system, 0 otherwise.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/packages-install-3.tcl packages/acs-admin/ www/apm/packages-install-3.tcl apm_package_upgrade_p apm_package_upgrade_p packages/acs-admin/www/apm/packages-install-3.tcl->apm_package_upgrade_p packages/acs-admin/www/install/install-3.tcl packages/acs-admin/ www/install/install-3.tcl packages/acs-admin/www/install/install-3.tcl->apm_package_upgrade_p apm_highest_version_name apm_highest_version_name (public) apm_package_upgrade_p->apm_highest_version_name apm_version_names_compare apm_version_names_compare (public) apm_package_upgrade_p->apm_version_names_compare

Testcases:
No testcase defined.

apm_package_upgrade_parameters (private)

 apm_package_upgrade_parameters [ -callback callback ] parameters \
    package_key

Upgrades the parameters to the current version.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
parameters (required)
package_key (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_package_upgrade_parameters apm_package_upgrade_parameters apm_package_install->apm_package_upgrade_parameters apm_parameter_register apm_parameter_register (public) apm_package_upgrade_parameters->apm_parameter_register apm_parameter_update apm_parameter_update (public) apm_package_upgrade_parameters->apm_parameter_update db_0or1row db_0or1row (public) apm_package_upgrade_parameters->db_0or1row

Testcases:
No testcase defined.

apm_package_version_count (private)

 apm_package_version_count package_key
Parameters:
package_key (required)
Returns:
The number of versions of the indicated package.

Partial Call Graph (max 5 caller/called nodes):
%3 db_string db_string (public) apm_package_version_count apm_package_version_count apm_package_version_count->db_string

Testcases:
No testcase defined.

apm_package_version_delete (private)

 apm_package_version_delete [ -callback callback ] version_id

Deletes a version from the database.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 db_exec_plsql db_exec_plsql (public) apm_package_version_delete apm_package_version_delete apm_package_version_delete->db_exec_plsql

Testcases:
No testcase defined.

apm_packages_full_install (private)

 apm_packages_full_install [ -callback callback ] pkg_info_list

Loads the data model, installs, enables, instantiates, and mounts all of the packages in pkg_list.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
pkg_info_list (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_simple_package_install apm_simple_package_install (public) apm_packages_full_install apm_packages_full_install apm_simple_package_install->apm_packages_full_install apm_callback_and_log apm_callback_and_log (public) apm_packages_full_install->apm_callback_and_log apm_package_install apm_package_install (public) apm_packages_full_install->apm_package_install pkg_info_key pkg_info_key (public) apm_packages_full_install->pkg_info_key pkg_info_spec pkg_info_spec (public) apm_packages_full_install->pkg_info_spec

Testcases:
No testcase defined.

apm_query_files_find (private)

 apm_query_files_find package_key file_list
Parameters:
package_key (required)
file_list (required)
A list of files and file types of form [list [list "foo.sql" "data_model_upgrade"] ...]

Partial Call Graph (max 5 caller/called nodes):
%3 db_type db_type (public) apm_query_files_find apm_query_files_find apm_query_files_find->db_type

Testcases:
No testcase defined.

apm_scan_packages (public)

 apm_scan_packages [ -callback callback ] [ -new ] [ path ]

Scans a directory for unregistered package specification files.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
-new (optional, boolean)
Parameters:
path (optional)
Returns:
A list of unregistered .info files that can be parsed for further information.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_core_docs_uninstalled_packages_internal ad_core_docs_uninstalled_packages_internal (private) apm_scan_packages apm_scan_packages ad_core_docs_uninstalled_packages_internal->apm_scan_packages apm_build_repository apm_build_repository (private) apm_build_repository->apm_scan_packages apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->apm_scan_packages packages/acs-admin/www/apm/packages-install.tcl packages/acs-admin/ www/apm/packages-install.tcl packages/acs-admin/www/apm/packages-install.tcl->apm_scan_packages packages/acs-tcl/lib/build-repository.tcl packages/acs-tcl/ lib/build-repository.tcl packages/acs-tcl/lib/build-repository.tcl->apm_scan_packages ad_file ad_file (public) apm_scan_packages->ad_file apm_callback_and_log apm_callback_and_log (public) apm_scan_packages->apm_callback_and_log apm_ignore_file_p apm_ignore_file_p (public) apm_scan_packages->apm_ignore_file_p apm_package_info_file_path apm_package_info_file_path (public) apm_scan_packages->apm_package_info_file_path apm_package_installed_p apm_package_installed_p (public) apm_scan_packages->apm_package_installed_p

Testcases:
No testcase defined.

apm_simple_package_install (public)

 apm_simple_package_install package_key

Simple basic package install function. Wraps up basically what the old install XML action did.

Parameters:
package_key (required)

Partial Call Graph (max 5 caller/called nodes):
%3 install::xml::action::install install::xml::action::install (public) apm_simple_package_install apm_simple_package_install install::xml::action::install->apm_simple_package_install apm_dependency_check apm_dependency_check (private) apm_simple_package_install->apm_dependency_check apm_package_info_file_path apm_package_info_file_path (public) apm_simple_package_install->apm_package_info_file_path apm_package_installed_p apm_package_installed_p (public) apm_simple_package_install->apm_package_installed_p apm_package_supports_rdbms_p apm_package_supports_rdbms_p (public) apm_simple_package_install->apm_package_supports_rdbms_p apm_packages_full_install apm_packages_full_install (private) apm_simple_package_install->apm_packages_full_install

Testcases:
No testcase defined.

apm_unregister_disinherited_params (public)

 apm_unregister_disinherited_params package_key dependency_id

Remove parameters for package_key that have been disinherited (i.e., the dependency that caused them to be inherited have been removed). Called only by the APM and keep it that way, please.

Parameters:
package_key (required)
dependency_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/version-dependency-remove.tcl packages/acs-admin/ www/apm/version-dependency-remove.tcl apm_unregister_disinherited_params apm_unregister_disinherited_params packages/acs-admin/www/apm/version-dependency-remove.tcl->apm_unregister_disinherited_params apm_parameter_unregister apm_parameter_unregister (public) apm_unregister_disinherited_params->apm_parameter_unregister db_list db_list (public) apm_unregister_disinherited_params->db_list

Testcases:
No testcase defined.

apm_upgrade_for_version_p (private)

 apm_upgrade_for_version_p path initial_version_name final_version_name
Parameters:
path (required)
initial_version_name (required)
final_version_name (required)
Returns:
1 if the file indicated by path is a valid SQL script to upgrade initial_version_name to final_version_name

Partial Call Graph (max 5 caller/called nodes):
%3 apm_data_model_scripts_find apm_data_model_scripts_find (public) apm_upgrade_for_version_p apm_upgrade_for_version_p apm_data_model_scripts_find->apm_upgrade_for_version_p db_exec_plsql db_exec_plsql (public) apm_upgrade_for_version_p->db_exec_plsql

Testcases:
No testcase defined.

apm_upgrade_logic (public)

 apm_upgrade_logic -from_version_name from_version_name \
    -to_version_name to_version_name -spec spec

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.

apm_upgrade_logic_compare (private)

 apm_upgrade_logic_compare from_to_key_1 from_to_key_2

Compare the from-versions in two of apm_upgrade_logic's array entries on the form 'from_version_name,to_version_name'.

Parameters:
from_to_key_1 (required)
the first key from the array in apm_upgrade_logic
from_to_key_2 (required)
the second key from the array in apm_upgrade_logic
Returns:
1 if 1 comes after 2, 0 if they are the same, -1 if 1 comes before 2.
Author:
Lars Pind

Partial Call Graph (max 5 caller/called nodes):
%3 apm_version_names_compare apm_version_names_compare (public) apm_upgrade_logic_compare apm_upgrade_logic_compare apm_upgrade_logic_compare->apm_version_names_compare

Testcases:
No testcase defined.

apm_upgrade_script_compare (private)

 apm_upgrade_script_compare f1 f2
Parameters:
f1 (required)
f2 (required)
Returns:
1 if f1 comes after f2, 0 if they are the same, -1 if f1 comes before f2.

Partial Call Graph (max 5 caller/called nodes):
%3 db_exec_plsql db_exec_plsql (public) apm_upgrade_script_compare apm_upgrade_script_compare apm_upgrade_script_compare->db_exec_plsql

Testcases:
No testcase defined.

apm_version_disable (public)

 apm_version_disable [ -callback callback ] version_id

Disables a version of a package.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
version_id (required)
The id of the version to be disabled.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/version-disable.tcl packages/acs-admin/ www/apm/version-disable.tcl apm_version_disable apm_version_disable packages/acs-admin/www/apm/version-disable.tcl->apm_version_disable acs::try_cache acs::try_cache (private) apm_version_disable->acs::try_cache apm_callback_and_log apm_callback_and_log (public) apm_version_disable->apm_callback_and_log apm_package_key_from_version_id apm_package_key_from_version_id (public) apm_version_disable->apm_package_key_from_version_id db_exec_plsql db_exec_plsql (public) apm_version_disable->db_exec_plsql

Testcases:
No testcase defined.

apm_version_enable (public)

 apm_version_enable [ -callback callback ] version_id

Enables a version of a package (disabling any other version of the package).

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
version_id (required)
The id of the version to be enabled.

Partial Call Graph (max 5 caller/called nodes):
%3 test_upgrade upgrade (test acs-lang) apm_version_enable apm_version_enable test_upgrade->apm_version_enable acs::try_cache acs::try_cache (private) apm_version_enable->acs::try_cache apm_callback_and_log apm_callback_and_log (public) apm_version_enable->apm_callback_and_log apm_package_key_from_version_id apm_package_key_from_version_id (public) apm_version_enable->apm_package_key_from_version_id db_exec_plsql db_exec_plsql (public) apm_version_enable->db_exec_plsql apm_package_install apm_package_install (public) apm_package_install->apm_version_enable packages/acs-admin/www/apm/package-add-2.tcl packages/acs-admin/ www/apm/package-add-2.tcl packages/acs-admin/www/apm/package-add-2.tcl->apm_version_enable packages/acs-admin/www/apm/version-enable.tcl packages/acs-admin/ www/apm/version-enable.tcl packages/acs-admin/www/apm/version-enable.tcl->apm_version_enable packages/acs-admin/www/install/install-3.tcl packages/acs-admin/ www/install/install-3.tcl packages/acs-admin/www/install/install-3.tcl->apm_version_enable

Testcases:
upgrade

apm_version_names_compare (public)

 apm_version_names_compare version_name_1 version_name_2

Compare two version names for which is earlier than the other. Example:

  • apm_version_names_compare "1.2d3" "3.5b" => -1
  • apm_version_names_compare "3.5b" "3.5b" => 0
  • apm_version_names_compare "3.5b" "1.2d3" => 1

Parameters:
version_name_1 (required)
the first version name
version_name_2 (required)
the second version name
Returns:
  • -1: the first version is smallest
  • 0: they're identical
  • 1: the second version is smallest
Author:
Lars Pind

Partial Call Graph (max 5 caller/called nodes):
%3 test_apm_version_names_compare apm_version_names_compare (test acs-tcl) apm_version_names_compare apm_version_names_compare test_apm_version_names_compare->apm_version_names_compare db_1row db_1row (public) apm_version_names_compare->db_1row Class ::xowiki::WikiForm Class ::xowiki::WikiForm (public) Class ::xowiki::WikiForm->apm_version_names_compare apm_dependency_check_new apm_dependency_check_new (public) apm_dependency_check_new->apm_version_names_compare apm_dependency_provided_p apm_dependency_provided_p (public) apm_dependency_provided_p->apm_version_names_compare apm_get_installed_provides apm_get_installed_provides (public) apm_get_installed_provides->apm_version_names_compare apm_git_build_repository apm_git_build_repository (private) apm_git_build_repository->apm_version_names_compare

Testcases:
apm_version_names_compare

apm_version_sortable (public)

 apm_version_sortable version

Return a sortable version of the version name.

Parameters:
version (required)
Author:
Jeff Davis

Partial Call Graph (max 5 caller/called nodes):
%3 test_files__check_upgrade_ordering files__check_upgrade_ordering (test acs-tcl) apm_version_sortable apm_version_sortable test_files__check_upgrade_ordering->apm_version_sortable db_string db_string (public) apm_version_sortable->db_string

Testcases:
files__check_upgrade_ordering

apm_version_update (public)

 apm_version_update [ -callback callback ] -array array version_id \
    version_name version_uri summary description description_format \
    vendor vendor_uri auto_mount [ release_date ]

Update a version in the system to new information.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
-array (required)
Parameters:
version_id (required)
version_name (required)
version_uri (required)
summary (required)
description (required)
description_format (required)
vendor (required)
vendor_uri (required)
auto_mount (required)
release_date (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/version-edit-2.tcl packages/acs-admin/ www/apm/version-edit-2.tcl apm_version_update apm_version_update packages/acs-admin/www/apm/version-edit-2.tcl->apm_version_update apm::package_version::attributes::store apm::package_version::attributes::store (private) apm_version_update->apm::package_version::attributes::store db_exec_plsql db_exec_plsql (public) apm_version_update->db_exec_plsql

Testcases:
No testcase defined.

apm_version_upgrade (public)

 apm_version_upgrade version_id

Upgrade a package to a locally maintained later version.

Parameters:
version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_version_upgrade apm_version_upgrade apm_package_install->apm_version_upgrade packages/acs-admin/www/apm/version-edit-2.tcl packages/acs-admin/ www/apm/version-edit-2.tcl packages/acs-admin/www/apm/version-edit-2.tcl->apm_version_upgrade packages/acs-admin/www/apm/version-upgrade.tcl packages/acs-admin/ www/apm/version-upgrade.tcl packages/acs-admin/www/apm/version-upgrade.tcl->apm_version_upgrade db_exec_plsql db_exec_plsql (public) apm_version_upgrade->db_exec_plsql

Testcases:
No testcase defined.

pkg_info_comment (public)

 pkg_info_comment pkg_info
Parameters:
pkg_info (required)
Returns:
Any comment specified about this package.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_selection_widget apm_package_selection_widget (private) pkg_info_comment pkg_info_comment apm_package_selection_widget->pkg_info_comment apm_simple_package_install apm_simple_package_install (public) apm_simple_package_install->pkg_info_comment

Testcases:
No testcase defined.

pkg_info_dependency_p (public)

 pkg_info_dependency_p pkg_info
Parameters:
pkg_info (required)
Returns:
Does it pass the dependency checker? "" Means it has not been run yet.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_selection_widget apm_package_selection_widget (private) pkg_info_dependency_p pkg_info_dependency_p apm_package_selection_widget->pkg_info_dependency_p apm_simple_package_install apm_simple_package_install (public) apm_simple_package_install->pkg_info_dependency_p

Testcases:
No testcase defined.

pkg_info_embeds (private)

 pkg_info_embeds pkg_info
Parameters:
pkg_info (required)
Returns:
The "embeds" dependencies of the package.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) pkg_info_embeds pkg_info_embeds apm_dependency_check->pkg_info_embeds

Testcases:
No testcase defined.

pkg_info_extends (private)

 pkg_info_extends pkg_info
Parameters:
pkg_info (required)
Returns:
The "extends" dependencies of the package.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) pkg_info_extends pkg_info_extends apm_dependency_check->pkg_info_extends

Testcases:
No testcase defined.

pkg_info_key (public)

 pkg_info_key pkg_info
Parameters:
pkg_info (required)
Returns:
The package-key stored in the package info map.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) pkg_info_key pkg_info_key apm_dependency_check->pkg_info_key apm_package_selection_widget apm_package_selection_widget (private) apm_package_selection_widget->pkg_info_key apm_packages_full_install apm_packages_full_install (private) apm_packages_full_install->pkg_info_key apm_simple_package_install apm_simple_package_install (public) apm_simple_package_install->pkg_info_key packages/acs-admin/www/apm/packages-install-3.tcl packages/acs-admin/ www/apm/packages-install-3.tcl packages/acs-admin/www/apm/packages-install-3.tcl->pkg_info_key

Testcases:
No testcase defined.

pkg_info_new (public)

 pkg_info_new package_key spec_file_path embeds extends provides \
    requires [ dependency_p ] [ comment ]

Returns a datastructure that maintains information about a package.

Parameters:
package_key (required)
The key of the package.
spec_file_path (required)
The path to the package specification file
embeds (required)
A list of packages to be embedded in the package.
extends (required)
A list of packages extended by the package.
provides (required)
A list of dependencies provided by the package.
requires (required)
A list of requirements provided by the package..
dependency_p (optional)
Can the package be installed without violating dependency checking.
comment (optional)
Some text about the package. Useful to explain why it fails dependency check.
Returns:
a list whose first element is a package key and whose second element is a path to the associated .info file.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) pkg_info_new pkg_info_new apm_dependency_check->pkg_info_new apm_simple_package_install apm_simple_package_install (public) apm_simple_package_install->pkg_info_new packages/acs-admin/www/apm/packages-install-2.tcl packages/acs-admin/ www/apm/packages-install-2.tcl packages/acs-admin/www/apm/packages-install-2.tcl->pkg_info_new packages/acs-admin/www/apm/packages-install.tcl packages/acs-admin/ www/apm/packages-install.tcl packages/acs-admin/www/apm/packages-install.tcl->pkg_info_new

Testcases:
No testcase defined.

pkg_info_path (public)

 pkg_info_path pkg_info
Parameters:
pkg_info (required)
Returns:
The full path of the packages dir stored in the package info map. Assumes that the info file is stored in the root dir of the package.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_selection_widget apm_package_selection_widget (private) pkg_info_path pkg_info_path apm_package_selection_widget->pkg_info_path packages/acs-admin/www/apm/packages-install-3.tcl packages/acs-admin/ www/apm/packages-install-3.tcl packages/acs-admin/www/apm/packages-install-3.tcl->pkg_info_path packages/acs-admin/www/apm/packages-install-4.tcl packages/acs-admin/ www/apm/packages-install-4.tcl packages/acs-admin/www/apm/packages-install-4.tcl->pkg_info_path pkg_info_spec pkg_info_spec (public) pkg_info_path->pkg_info_spec

Testcases:
No testcase defined.

pkg_info_provides (private)

 pkg_info_provides pkg_info
Parameters:
pkg_info (required)
Returns:
The dependencies provided by the package.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) pkg_info_provides pkg_info_provides apm_dependency_check->pkg_info_provides

Testcases:
No testcase defined.

pkg_info_requires (private)

 pkg_info_requires pkg_info
Parameters:
pkg_info (required)
Returns:
The dependencies "requires" dependencies of the package.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) pkg_info_requires pkg_info_requires apm_dependency_check->pkg_info_requires

Testcases:
No testcase defined.

pkg_info_spec (public)

 pkg_info_spec pkg_info
Parameters:
pkg_info (required)
Returns:
The .info file stored in the package info map.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check apm_dependency_check (private) pkg_info_spec pkg_info_spec apm_dependency_check->pkg_info_spec apm_package_selection_widget apm_package_selection_widget (private) apm_package_selection_widget->pkg_info_spec apm_packages_full_install apm_packages_full_install (private) apm_packages_full_install->pkg_info_spec packages/acs-admin/www/apm/packages-install-3.tcl packages/acs-admin/ www/apm/packages-install-3.tcl packages/acs-admin/www/apm/packages-install-3.tcl->pkg_info_spec packages/acs-admin/www/apm/packages-install-4.tcl packages/acs-admin/ www/apm/packages-install-4.tcl packages/acs-admin/www/apm/packages-install-4.tcl->pkg_info_spec

Testcases:
No testcase defined.
[ show source ]