apm_scan_packages (public)
apm_scan_packages [ -callback callback ] [ -new ] [ path ]
Defined in packages/acs-tcl/tcl/apm-install-procs.tcl
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.
Source code: if { $path eq "" } { set path [apm_workspace_install_dir] } ### Scan for all unregistered .info files. ns_log Notice "apm_scan_packages: Scanning for new unregistered packages..." set new_spec_files [list] # Loop through all directories in the /packages directory, searching each for a # .info file. foreach dir [lsort [glob -nocomplain "$path/*"]] { set package_key [ad_file tail $dir] if { ![ad_file isdirectory $dir] } { continue } if { [apm_ignore_file_p $dir] } { apm_callback_and_log $callback "Skipping the directory \"$package_key\"." continue } # At this point, we should have a directory that is equivalent to a package_key. if { [apm_package_installed_p $package_key] } { if {$new_p} { continue } } # Locate the .info file for this package. if { [catch { set info_file [apm_package_info_file_path -path $path $package_key] } error] } { apm_callback_and_log -severity Warning $callback "Unable to locate specification file for package $package_key: $error" continue } # We found the .info file. lappend new_spec_files $info_file } if { [llength $new_spec_files] == 0 } { ns_log Notice "apm_scan_packages: No new packages found in $path" } return $new_spec_filesGeneric XQL file: packages/acs-tcl/tcl/apm-install-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/apm-install-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/apm-install-procs-oracle.xql