Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -r1.29 -r1.29.2.1 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 21 Oct 2003 13:54:07 -0000 1.29 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 19 Nov 2003 00:58:16 -0000 1.29.2.1 @@ -542,6 +542,7 @@ apm_callback_and_log $callback " The file cannot be found. Your URL or your file name is incorrect. Please verify that the file name is correct and try again." + ns_log Error "Error loading APM file form url $url: The file cannot be found." return } if { [catch { @@ -552,11 +553,14 @@ apm_callback_and_log $callback "The follow error occured during the uncompression process:
[ad_quotehtml $errmsg]

" + global errorInfo + ns_log Error "Error loading APM file form url $url: $errmsg\n$errorInfo" return } if { [llength $files] == 0 } { apm_callback_and_log $callback "The archive does not contain any files.\n" + ns_log Error "Error loading APM file form url $url: The archive does not contain any files." return } @@ -569,22 +573,25 @@ apm_callback_and_log $callback "All files in the archive must be contained in the same directory (corresponding to the package's key). This is not the case, so the archive is not a valid APM file.\n" + ns_log Error "Error loading APM file form url $url: Invalid APM file. All files in the archive must be contained in the same directory corresponding to the package's key." return } if { [llength $components] == 2 && ![string compare [file extension $file] ".info"] } { if { [info exists info_file] } { apm_callback_and_log $callback "The archive contains more than one package/*/*.info file, so it is not a valid APM file.\n" + ns_log Error "Error loading APM file form url $url: Invalid APM file. More than one package .info file." return } else { set info_file $file } } } - if { ![info exists info_file] || [regexp {[^a-zA-Z0-9\-\./_]} $info_file] } { - apm_callback_and_log $callback "The archive does not contain a */*.info file, so it is not - a valid APM file.\n" - return + if { ![info exists info_file] || [regexp {[^a-zA-Z0-9\-\./_]} $info_file] } { + apm_callback_and_log $callback "The archive does not contain a */*.info file, so it is not + a valid APM file.\n" + ns_log Error "Error loading APM file form url $url: Invalid APM file. No package .info file." + return } apm_callback_and_log $callback "Extracting the .info file ($info_file)..." @@ -602,6 +609,8 @@

The package cannot be installed. \n" + global errorInfo + ns_log Error "Error loading APM file form url $url: Bad package .info file. $errmsg\n$errorInfo" return } file delete -force $tmpdir @@ -611,8 +620,8 @@ ns_log Debug "APM: Preparing to load $pretty_name $version_name" # Determine if this package version is already installed. if {[apm_package_version_installed_p $package_key $version_name]} { - apm_callback_and_log $callback "

  • $pretty_name $version_name is already installed in your system. - " + apm_callback_and_log $callback "
  • $pretty_name $version_name is already installed in your system." + ns_log Error "Error loading APM file form url $url: Package $pretty_name $version_name is already installed" } else { set install_path "[apm_workspace_install_dir]"