From 1800daed8306ca52a16e431a430162e4d7761cf4 Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Tue, 26 Nov 2002 01:34:31 +0000 Subject: [PATCH] MFH --- pear/PEAR/Command/Install.php | 12 ++++++++++++ pear/PEAR/Installer.php | 6 +++--- pear/package-PEAR.xml | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pear/PEAR/Command/Install.php b/pear/PEAR/Command/Install.php index 69256a9f56..61014ede0e 100644 --- a/pear/PEAR/Command/Install.php +++ b/pear/PEAR/Command/Install.php @@ -66,6 +66,9 @@ class PEAR_Command_Install extends PEAR_Command_Common 'arg' => 'DIR', 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), ), 'doc' => ' ... Installs one or more PEAR packages. You can specify a package to @@ -117,6 +120,9 @@ four ways of specifying packages. 'arg' => 'DIR', 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), ), 'doc' => ' ... Upgrades one or more PEAR packages. See documentation for the @@ -154,6 +160,9 @@ More than one package may be specified at once. 'arg' => 'DIR', 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), ), 'doc' => ' Upgrades all packages that have a newer release available. Upgrades are @@ -179,6 +188,9 @@ more stable. 'arg' => 'DIR', 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), ), 'doc' => ' ... Uninstalls one or more PEAR packages. More than one package may be diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index 21d7bf9235..0501194cd7 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -220,8 +220,8 @@ class PEAR_Installer extends PEAR_Common $this->log(3, "+ mkdir $dest_dir"); } if (empty($atts['replacements'])) { - if (!copy($orig_file, $dest_file)) { - return $this->raiseError("failed to copy $orig_file to $dest_file", + if (!@copy($orig_file, $dest_file)) { + return $this->raiseError("failed to write $dest_file", PEAR_INSTALLER_FAILED); } $this->log(3, "+ cp $orig_file $dest_file"); @@ -684,7 +684,7 @@ class PEAR_Installer extends PEAR_Common $res = $this->_installFile($file, $atts, $tmp_path); $this->popExpect(); if (PEAR::isError($res)) { - if (empty($options['force'])) { + if (empty($options['ignore-errors'])) { $this->rollbackFileTransaction(); return $this->raiseError($res); } else { diff --git a/pear/package-PEAR.xml b/pear/package-PEAR.xml index 98628294b9..01003e5151 100644 --- a/pear/package-PEAR.xml +++ b/pear/package-PEAR.xml @@ -33,7 +33,7 @@ 1.0b2 stable - 2002-11-11 + 2002-11-26 Changes, Installer: * --force option no longer ignores errors, use -- 2.50.1