• Publicity: Public Only All

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.126.2.25 2022/11/24 12:44:18 gustafn 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
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::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_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
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
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::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
(boolean) (optional)
-install_from_repository
(boolean) (optional)
Parameters:
filename - path to the XML file relative to serverroot.
binds - 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
dependencies

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
parameter_name

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 - 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_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
(defaults to "[list]") (optional)
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 - The dependency that is being checked.
dependency_version - 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 (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
(boolean) (optional)
-type
(defaults to "action") (optional)
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_package_deinstall (public)

 apm_package_deinstall [ -callback callback ] package_key

Deinstalls a package from the filesystem.

Switches:
-callback
(defaults to "apm_dummy_callback") (optional)
Parameters:
package_key - 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
(defaults to "apm_dummy_callback") (optional)
-remove_files
(boolean) (optional)
-delete_site_nodes
(boolean) (optional)
Parameters:
package_key

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
(boolean) (optional)
-callback
(defaults to "apm_dummy_callback") (optional)
-load_data_model
(boolean) (optional)
-install_from_repository
(boolean) (optional)
-data_model_files
(defaults to "0") (optional)
-package_path
(optional)
-mount_path
(optional)
Parameters:
spec_file_path - 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_owners (public)

 apm_package_install_owners [ -callback callback ] owners version_id

Install all of the owners of the package version.

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

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
owner_uris

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_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

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
(defaults to "apm_dummy_callback") (optional)
-array
(required)
The name of the array in the callers scope holding package version attributes
-version_id
(optional)
Parameters:
package_key
version_name
version_uri
summary
description
description_format
vendor
vendor_uri
auto_mount
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
pretty_name
pretty_plural
package_uri
package_type
initial_install_p
singleton_p
implements_subsite_p
inherit_templates_p

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_p (public)

 apm_package_upgrade_p package_key version_name
Parameters:
package_key
version_name
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_scan_packages (public)

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

Scans a directory for unregistered package specification files.

Switches:
-callback
(defaults to "apm_dummy_callback") (optional)
-new
(boolean) (optional)
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

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
dependency_id

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_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 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.

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_version_disable (public)

 apm_version_disable [ -callback callback ] version_id

Disables a version of a package.

Switches:
-callback
(defaults to "apm_dummy_callback") (optional)
Parameters:
version_id - 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
(defaults to "apm_dummy_callback") (optional)
Parameters:
version_id - 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 - the first version name
version_name_2 - 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_higher_version_installed_p apm_higher_version_installed_p (public) apm_higher_version_installed_p->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
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
(defaults to "apm_dummy_callback") (optional)
-array
(required)
Parameters:
version_id
version_name
version_uri
summary
description
description_format
vendor
vendor_uri
auto_mount
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

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
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
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_key (public)

 pkg_info_key pkg_info
Parameters:
pkg_info
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 - The key of the package.
spec_file_path - The path to the package specification file
embeds - A list of packages to be embedded in the package.
extends - A list of packages extended by the package.
provides - A list of dependencies provided by the package.
requires - 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
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_spec (public)

 pkg_info_spec pkg_info
Parameters:
pkg_info
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 ]