ad_page_contract { Select, dependency check, install and enable packages. @author Bryan Quinn (bquinn@arsdigita.com) @cvs-id $Id: packages-install.tcl,v 1.28 2018/05/09 15:33:28 hectorr Exp $ } { {checked_by_default_p:boolean 0} {operation:word all} } set title "Package Installation" set context [list [list "/acs-admin/apm/" "Package Manager"] $title] set dimensional_list { { operation "Operation:" all { { upgrade "Upgrade" {} } { install "Install" {} } { all "All" {} } } } } set dimensional_list [ad_dimensional $dimensional_list] ### Get all the spec files # # If a package is in the apm_workspace dir then we assume that this is # the package that should be installed and we ignore any such package # in the packages dir. # # TODO: make sure that it's a later version than that in the packages dir? # set packages_root_dir "$::acs::rootdir/packages" set packages_spec_files [apm_scan_packages $packages_root_dir] set workspace_spec_files [apm_scan_packages [apm_workspace_install_dir]] set workspace_filenames [list] foreach spec_path $workspace_spec_files { lappend workspace_filenames [file tail $spec_path] } set all_spec_files $workspace_spec_files foreach spec_path $packages_spec_files { set spec_filename [file tail $spec_path] if {$spec_filename ni $workspace_filenames} { lappend all_spec_files $spec_path } } # Determine which spec files are new installs; install all of the new items. set spec_files [list] set already_installed_list [list] set not_compatible_list [list] foreach spec_file $all_spec_files { array set version [apm_read_package_info_file $spec_file] set version_name $version(name) set package_name $version(package-name) set package_key $version(package.key) if { [apm_package_supports_rdbms_p -package_key $package_key] } { if { [apm_package_registered_p $package_key] } { # This package is already on the system if { [apm_higher_version_installed_p $package_key $version_name] } { ns_log Notice "higher version installed of $package_key $version_name" lappend spec_files $spec_file } else { ns_log Notice "need upgrade of package $package_key $version_name" lappend already_installed_list \ "Package $package_name ($package_key): version $version_name or higher is already installed." } } else { lappend spec_files $spec_file } } else { lappend not_compatible_list "Package $package_name ($package_key): doesn't support [db_type]." } } apm_log APMDebug $spec_files set body "" if { $spec_files eq "" } { # No spec files to work with. append body [subst {
There are no new packages to install. Please load some using the Package Loader.
Return to the APM.
}] } else { append body {
Please select the set of packages you'd like to install.
} [subst {