cvs: php4 /pear package-PEAR.xml /pear/PEAR Installer.php /pear/PEAR/Command Install.php

From: Date: Tue, 26 Nov 2002 01:32:48 +0000
Subject: cvs: php4 /pear package-PEAR.xml /pear/PEAR Installer.php /pear/PEAR/Command Install.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7600@lists.php.net to get a copy of this message
ssb Mon Nov 25 20:32:48 2002 EDT Modified files: /php4/pear package-PEAR.xml /php4/pear/PEAR Installer.php /php4/pear/PEAR/Command Install.php Log: * added --ignore-errors option, --force no longer ignores errors Index: php4/pear/package-PEAR.xml diff -u php4/pear/package-PEAR.xml:1.28 php4/pear/package-PEAR.xml:1.29 --- php4/pear/package-PEAR.xml:1.28 Sat Nov 9 22:03:19 2002 +++ php4/pear/package-PEAR.xml Mon Nov 25 20:32:46 2002 @@ -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"/> Index: php4/pear/PEAR/Installer.php diff -u php4/pear/PEAR/Installer.php:1.82 php4/pear/PEAR/Installer.php:1.83 --- php4/pear/PEAR/Installer.php:1.82 Thu Nov 14 18:23:21 2002 +++ php4/pear/PEAR/Installer.php Mon Nov 25 20:32:47 2002 @@ -17,7 +17,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: Installer.php,v 1.82 2002/11/14 23:23:21 ssb Exp $ +// $Id: Installer.php,v 1.83 2002/11/26 01:32:47 ssb Exp $ require_once 'PEAR/Common.php'; require_once 'PEAR/Registry.php'; @@ -220,8 +220,8 @@ $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 @@ $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 { Index: php4/pear/PEAR/Command/Install.php diff -u php4/pear/PEAR/Command/Install.php:1.38 php4/pear/PEAR/Command/Install.php:1.39 --- php4/pear/PEAR/Command/Install.php:1.38 Wed Nov 13 09:17:25 2002 +++ php4/pear/PEAR/Command/Install.php Mon Nov 25 20:32:47 2002 @@ -16,7 +16,7 @@ // | Author: Stig Sæther Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: Install.php,v 1.38 2002/11/13 14:17:25 dickmann Exp $ +// $Id: Install.php,v 1.39 2002/11/26 01:32:47 ssb Exp $ require_once "PEAR/Command/Common.php"; require_once "PEAR/Installer.php"; @@ -66,6 +66,9 @@ '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 @@ '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 @@ '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 @@ -178,6 +187,9 @@ 'shortopt' => 'R', '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> ...

« previous php.pear.cvs (#7600) next »