cvs: pear-core /PEAR Installer.php
| From: | Greg Beaver | Date: | Thu, 30 Mar 2006 00:02:46 +0000 |
| Subject: | cvs: pear-core /PEAR Installer.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4687@lists.php.net to get a copy of this message | ||
cellog Thu Mar 30 00:02:46 2006 UTC
Modified files:
/pear-core/PEAR Installer.php
Log:
fix fatal error on uninstall if there is a problem
make sure that on failure, the package is not
uninstalled from the registry
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Installer.php?r1=1.231&r2=1.232&diff_format=u
Index: pear-core/PEAR/Installer.php
diff -u pear-core/PEAR/Installer.php:1.231 pear-core/PEAR/Installer.php:1.232
--- pear-core/PEAR/Installer.php:1.231 Sun Mar 26 22:39:22 2006
+++ pear-core/PEAR/Installer.php Thu Mar 30 00:02:46 2006
@@ -18,7 +18,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Installer.php,v 1.231 2006/03/26 22:39:22 cellog Exp $
+ * @version CVS: $Id: Installer.php,v 1.232 2006/03/30 00:02:46 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -1500,6 +1500,7 @@
$this->log(0, $e[0]);
}
}
+ $this->pkginfo = &$pkg;
// {{{ Delete the files
$this->startFileTransaction();
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
@@ -1538,6 +1539,11 @@
}
if (!$this->commitFileTransaction()) {
$this->rollbackFileTransaction();
+ if (!isset($options['ignore-errors'])) {
+ return $this->raiseError("uninstall failed");
+ } elseif (!isset($options['soft'])) {
+ $this->log(0, 'WARNING: uninstall failed');
+ }
}
}
// }}}