summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>2002-11-26 01:32:47 +0000
committerStig Bakken <ssb@php.net>2002-11-26 01:32:47 +0000
commitdf158fa5cf7f8900508c28ac5ee696974a452a24 (patch)
tree3617a2eb4ebddc7f0835fa7910359f67233ee8a3
parent58c57d43ab522d986c3273bf9d8d1e0ccf86aa4a (diff)
downloadphp-git-df158fa5cf7f8900508c28ac5ee696974a452a24.tar.gz
* added --ignore-errors option, --force no longer ignores errors
-rw-r--r--pear/PEAR/Command/Install.php12
-rw-r--r--pear/PEAR/Installer.php6
-rw-r--r--pear/package-PEAR.xml9
3 files changed, 21 insertions, 6 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' => '<package> ...
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' => '<package> ...
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' => '<package> ...
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 13fcbb56f3..98628294b9 100644
--- a/pear/package-PEAR.xml
+++ b/pear/package-PEAR.xml
@@ -35,9 +35,12 @@
<state>stable</state>
<date>2002-11-11</date>
<notes>
-New Features, Installer:
-* installer aborts failed installs nicely (using
- file "transactions")
+Changes, Installer:
+* --force option no longer ignores errors, use
+ --ignore-errors instead
+* installer transactions: failed installs abort
+ cleanly, without leaving half-installed packages
+ around
</notes>
<filelist>
<file role="data" name="package.dtd"/>