Index: openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 17 Sep 2003 11:20:30 -0000 1.9 +++ openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 25 Sep 2003 10:47:55 -0000 1.10 @@ -105,10 +105,13 @@ set widget "
" + foreach pkg_info $pkg_info_list { incr counter set package_key [pkg_info_key $pkg_info] + set package_path [pkg_info_path $pkg_info] + set package_rel_path [string range $package_path [string length [acs_root_dir]] end] set spec_file [pkg_info_spec $pkg_info] array set package [apm_read_package_info_file $spec_file] set version_name $package(name) @@ -148,7 +151,7 @@ append widget "> Install [ad_decode $install_enable_p 1 "Enable " ""]Package Directory Comment $package(package-name) $package(name) -/packages/$package(package.key)/ +$package_rel_path Dependencies satisfied. " } elseif { ![string compare [pkg_info_dependency_p $pkg_info] "f"] } { @@ -166,7 +169,7 @@ append widget ">$package(package-name) $package(name) -/packages/$package(package.key)/ +$package_rel_path " foreach comment [pkg_info_comment $pkg_info] { @@ -219,7 +222,7 @@ append widget " $package(package-name) $package(name) -/packages/$package(package.key)/ +$package_rel_path $comment " } Index: openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 16 Jul 2003 00:15:31 -0000 1.8 +++ openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 25 Sep 2003 10:47:55 -0000 1.9 @@ -22,10 +22,11 @@ set sql_file_list [list] set file_count 0 - foreach pkg_info $pkg_install_list { set package_key [pkg_info_key $pkg_info] + set package_path [pkg_info_path $pkg_info] + array set version [apm_read_package_info_file [pkg_info_spec $pkg_info]] set final_version_name $version(name) @@ -50,6 +51,7 @@ [apm_data_model_scripts_find \ -upgrade_from_version_name $initial_version_name \ -upgrade_to_version_name $final_version_name \ + -package_path $package_path \ $package_key] \ [apm_ctl_files_find $package_key]] Index: openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 18 Sep 2003 17:18:40 -0000 1.12 +++ openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 25 Sep 2003 10:47:55 -0000 1.13 @@ -14,8 +14,6 @@ set pkg_install_list [ad_get_client_property apm pkg_install_list] set pkg_enable_list [ad_get_client_property apm pkg_enable_list] set sql_file_paths [ad_get_client_property apm sql_file_paths] -set install_path [ad_get_client_property apm install_path] -set copy_files_p [ad_get_client_property apm copy_files_p] ReturnHeaders ns_write "[apm_header "Package Installation"] @@ -34,6 +32,8 @@ set installed_count 0 foreach pkg_info $pkg_install_list { set spec_file [pkg_info_spec $pkg_info] + set package_path [pkg_info_path $pkg_info] + if { [catch { array set version [apm_read_package_info_file $spec_file] } errmsg] } { @@ -67,28 +67,18 @@ } # Install the packages. - ns_log Debug "APM: Installing packages from $install_path." - if {$copy_files_p} { - set version_id [apm_package_install -install_path $install_path \ - -callback apm_ns_write_callback -copy_files -load_data_model \ - -data_model_files $data_model_files \ - -mount_path $selected_mount_path \ - $spec_file] - if {$version_id != 0} { - file delete -force $install_path/$package_key - } - } else { - set enable_p [expr [lsearch -exact $pkg_enable_list $package_key] != -1] + ns_log Debug "APM: Installing package at $package_path." - set version_id [apm_package_install \ + set enable_p [expr [lsearch -exact $pkg_enable_list $package_key] != -1] + + set version_id [apm_package_install \ -enable=$enable_p \ - -install_path $install_path \ + -package_path $package_path \ -callback apm_ns_write_callback \ -load_data_model \ -data_model_files $data_model_files \ -mount_path $selected_mount_path \ $spec_file] - } if { $version_id == 0 } { # Installation of the package failed and we shouldn't continue with installation Index: openacs-4/packages/acs-admin/www/apm/packages-install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-admin/www/apm/packages-install.tcl 28 Aug 2003 09:41:37 -0000 1.16 +++ openacs-4/packages/acs-admin/www/apm/packages-install.tcl 25 Sep 2003 10:47:55 -0000 1.17 @@ -7,26 +7,31 @@ } { {checked_by_default_p:boolean 0} - {install_path [apm_workspace_install_dir]} } ad_return_top_of_page "[apm_header "Package Installation"]Please wait while the installer searches your system for packages to install ...
" -### Selection Phase -set all_spec_files [apm_scan_packages $install_path] -# Nothing in the install dir, maybe they just copied the files in under packages. -if { [empty_string_p $all_spec_files] } { - set actual_install_path "[acs_root_dir]/packages" - set all_spec_files [apm_scan_packages $actual_install_path] - # We don't need to copy any files, because they are already there. - ad_set_client_property apm copy_files_p 0 -} else { - ad_set_client_property apm copy_files_p 1 - set actual_install_path $install_path +### Get all the spec files +# If a package is in the apm_workspace dir then we assume that that 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_root_dir]/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 { [lsearch -exact $workspace_filenames $spec_filename] == -1 } { + lappend all_spec_files $spec_path + } +} # Determine which spec files are new installs; install all of the new items. set spec_files [list] @@ -90,8 +95,8 @@ this.href=''; } -uncheck all boxes | -check all boxes +uncheck all boxes | +check all boxes " ns_write "