- 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.132 2024/10/09 14:42:06 antoniop Exp $
Procedures in this file
- apm::package_version::attributes::default_value (public)
- apm::package_version::attributes::generate_xml (private)
- apm::package_version::attributes::generate_xml_element (private)
- apm::package_version::attributes::get (public)
- apm::package_version::attributes::get_instance_name (private)
- apm::package_version::attributes::get_pretty_name (public)
- apm::package_version::attributes::get_spec (public)
- apm::package_version::attributes::maturity_int_to_text (public)
- apm::package_version::attributes::parse_xml (private)
- apm::package_version::attributes::set_all_instances_names (private)
- apm::package_version::attributes::store (private)
- apm::package_version::attributes::validate_maturity (private)
- apm::process_install_xml (public)
- apm_copy_inherited_params (public)
- apm_copy_param_to_descendents (public)
- apm_data_model_scripts_find (public)
- apm_dependency_check (private)
- apm_dependency_check_new (public)
- apm_dependency_provided_p (public)
- apm_get_package_repository (public)
- apm_get_repository_channel (public)
- apm_get_repository_channels (public)
- apm_invoke_install_proc (public)
- apm_load_catalog_files (private)
- apm_load_install_xml (private)
- apm_mount_core_packages (private)
- apm_order_upgrade_scripts (private)
- apm_package_deinstall (public)
- apm_package_delete (public)
- apm_package_install (public)
- apm_package_install_callbacks (private)
- apm_package_install_data_model (private)
- apm_package_install_dependencies (private)
- apm_package_install_owners (public)
- apm_package_install_owners_prepare (public)
- apm_package_install_parameters (private)
- apm_package_install_spec (public)
- apm_package_install_version (public)
- apm_package_register (public)
- apm_package_upgrade_from (private)
- apm_package_upgrade_p (public)
- apm_package_upgrade_parameters (private)
- apm_package_version_count (private)
- apm_package_version_delete (private)
- apm_packages_full_install (private)
- apm_query_files_find (private)
- apm_scan_packages (public)
- apm_simple_package_install (public)
- apm_unregister_disinherited_params (public)
- apm_upgrade_for_version_p (private)
- apm_upgrade_logic (public)
- apm_upgrade_logic_compare (private)
- apm_upgrade_script_compare (private)
- apm_version_disable (public)
- apm_version_enable (public)
- apm_version_names_compare (public)
- apm_version_sortable (public)
- apm_version_update (public)
- apm_version_upgrade (public)
- pkg_info_comment (public)
- pkg_info_dependency_p (public)
- pkg_info_embeds (private)
- pkg_info_extends (private)
- pkg_info_key (public)
- pkg_info_new (public)
- pkg_info_path (public)
- pkg_info_provides (private)
- pkg_info_requires (private)
- pkg_info_spec (public)
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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- Testcases:
- No testcase defined.