apm_get_installed_provides (public)

 apm_get_installed_provides -array array

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

Sets the dependencies provided by the packages installed on this system in an array keyed by dependency service-uri.

Switches:
-array
(required)
Name of array in caller's namespace where you want this set

Partial Call Graph (max 5 caller/called nodes):
%3 apm_dependency_check_new apm_dependency_check_new (public) apm_get_installed_provides apm_get_installed_provides apm_dependency_check_new->apm_get_installed_provides apm_get_installed_versions apm_get_installed_versions (public) apm_get_installed_provides->apm_get_installed_versions apm_version_names_compare apm_version_names_compare (public) apm_get_installed_provides->apm_version_names_compare db_foreach db_foreach (public) apm_get_installed_provides->db_foreach

Testcases:
No testcase defined.
Source code:
    upvar 1 $array installed_provides

    # All packages provides themselves
    apm_get_installed_versions -array installed_provides

    # Now check what the provides clauses say
    db_foreach installed_provides {
        select service_uri,
        service_version
        from   apm_package_dependencies d,
        apm_package_versions v
        where  d.dependency_type = 'provides'
        and    d.version_id = v.version_id
        and    v.enabled_p = 't'
    } {
        if { ![info exists installed_provides($service_uri)]
             || [apm_version_names_compare $installed_provides($service_uri) $service_version] == -1
         } {
            set installed_provides($service_uri$service_version
        }
    }
Generic XQL file:
packages/acs-tcl/tcl/apm-procs.xql

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

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

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