Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -r1.67 -r1.68 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 27 Oct 2003 15:06:36 -0000 1.67 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 1 Nov 2003 08:45:37 -0000 1.68 @@ -25,7 +25,7 @@ ### Scan for all unregistered .info files. - ns_log "Notice" "Scanning for new unregistered packages..." + 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. @@ -56,7 +56,7 @@ } if { [llength $new_spec_files] == 0 } { - ns_log "Notice" "No new packages found." + ns_log Notice "apm_scan_packages: No new packages found." } return $new_spec_files } @@ -79,10 +79,10 @@ } { set old_version_p 0 set found_p 0 - ns_log Debug "Scanning for $dependency_uri version $dependency_version" + ns_log Debug "apm_dependency_provided_p: Scanning for $dependency_uri version $dependency_version" db_foreach apm_dependency_check {} { if { $version_p >= 0 } { - ns_log Debug "Dependency satisfied by previously installed package" + ns_log Debug "apm_dependency_provided_p: Dependency satisfied by previously installed package" set found_p 1 } elseif { $version_p == -1 } { set old_version_p 1 @@ -103,7 +103,7 @@ set provided_p [db_string version_greater_p {}] if { $provided_p >= 0 } { - ns_log Debug "Dependency satisfied in list of provisions." + ns_log Debug "apm_dependency_provided_p: Dependency satisfied in list of provisions." return 1 } else { set old_version_p 1 @@ -437,7 +437,7 @@ # Just to get us started set updated_p 1 - ns_log Debug "STARTING DEPENDENCY CHECK" + ns_log Debug "apm_dependency_check_new: STARTING DEPENDENCY CHECK" # Outer loop tries to find a package from the repository to add if # we're stuck because of unsatisfied dependencies @@ -462,7 +462,7 @@ if { ![info exists provided($req_uri)] || \ [apm_version_names_compare $provided($req_uri) $req_version]== -1 } { - ns_log Debug "$package_key requires $req_uri $req_version => failed" + ns_log Debug "apm_dependency_check_new: $package_key requires $req_uri $req_version => failed" set satisfied_p 0 @@ -472,7 +472,7 @@ set required($req_uri) $req_version } } else { - ns_log Debug "$package_key requires $req_uri $req_version => OK" + ns_log Debug "apm_dependency_check_new: $package_key requires $req_uri $req_version => OK" } } @@ -534,7 +534,7 @@ array unset version array set version $repository($package_key) - ns_log Debug "Considering $package_key: [array get version]" + ns_log Debug "apm_dependency_check_new: Considering $package_key: [array get version]" # Let's see if this package provides anything we need foreach prov $version(provides) { @@ -544,7 +544,7 @@ if { [info exists required($prov_uri)] && \ [apm_version_names_compare $required($prov_uri) $prov_version] <= 0 } { - ns_log Debug "Adding $package_key, as it provides $prov_uri $prov_version" + ns_log Debug "apm_dependency_check_new: Adding $package_key, as it provides $prov_uri $prov_version" # If this package provides something that's required in a version high enough # add it to the pending list @@ -591,9 +591,9 @@ [apm_version_names_compare $provided($req_uri) $req_version] == -1 } { lappend failed($package_key) [list $req_uri $req_version] if { [info exists provided($req_uri)] } { - ns_log Debug "Failed dependency: $package_key requires $req_uri $req_version, but we only provide $provided($req_uri)" + ns_log Debug "apm_dependency_check_new: Failed dependency: $package_key requires $req_uri $req_version, but we only provide $provided($req_uri)" } else { - ns_log Debug "Failed dependency: $package_key requires $req_uri $req_version, but we don't have it" + ns_log Debug "apm_dependency_check_new: Failed dependency: $package_key requires $req_uri $req_version, but we don't have it" } } } @@ -754,7 +754,7 @@ if { !$version_id } { # There was an error. - ns_log Error "Package $package_key could not be installed. Received version_id $version_id" + ns_log Error "apm_package_install: Package $package_key could not be installed. Received version_id $version_id" apm_callback_and_log $callback "The package version could not be created." } # Install the parameters for the version. @@ -769,7 +769,7 @@ apm_callback_and_log $callback "

Installed $version(package-name), version $version(name).

" } { global errorInfo - ns_log Error "Error installing $version(package-name) version $version(name): $errmsg\n$errorInfo" + ns_log Error "apm_package_install: Error installing $version(package-name) version $version(name): $errmsg\n$errorInfo" apm_callback_and_log -severity Error $callback "

Failed to install $version(package-name), version $version(name). The following error was generated:

@@ -830,7 +830,7 @@ # Another package is mounted at the path so we cannot mount global errorInfo set error_text "Package $version(package-name) could not be mounted at /$version(auto-mount) , there may already be a package mounted there, the error is: $error" - ns_log Error "$error_text \n\n$errorInfo" + ns_log Error "apm_package_install: $error_text \n\n$errorInfo" apm_callback_and_log $callback "

$error_text

" } @@ -1010,7 +1010,7 @@ foreach item $data_model_files { set file_path [lindex $item 0] set file_type [lindex $item 1] - ns_log Debug "APM: Now processing $file_path of type $file_type" + ns_log Debug "apm_package_install_data_model: Now processing $file_path of type $file_type" if {![string compare $file_type "data_model_create"] || \ ![string compare $file_type "data_model_upgrade"] } { if { !$ul_p } { @@ -1033,7 +1033,7 @@ db_source_sqlj_file -callback $callback "$path/$file_path" apm_callback_and_log $callback "
\n" } elseif { [string equal $file_type "ctl_file"] } { - ns_log Debug "APM: Now processing $file_path of type ctl_file" + ns_log Debug "apm_package_install_data_model: Now processing $file_path of type ctl_file" if { !$ul_p } { apm_callback_and_log $callback "