cvs: php-src /pear/PEAR Installer.php

From: Date: Tue, 16 Sep 2003 02:42:44 +0000
Subject: cvs: php-src /pear/PEAR Installer.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-12766@lists.php.net to get a copy of this message
cellog Mon Sep 15 22:42:44 2003 EDT Modified files: /php-src/pear/PEAR Installer.php Log: file transactions used - but startFileTransaction() was never used inline docs for install() were out of date Index: php-src/pear/PEAR/Installer.php diff -u php-src/pear/PEAR/Installer.php:1.118 php-src/pear/PEAR/Installer.php:1.119 --- php-src/pear/PEAR/Installer.php:1.118 Mon Sep 15 01:10:50 2003 +++ php-src/pear/PEAR/Installer.php Mon Sep 15 22:42:44 2003 @@ -18,7 +18,7 @@ // | Martin Jansen <mj@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Installer.php,v 1.118 2003/09/15 05:10:50 cellog Exp $ +// $Id: Installer.php,v 1.119 2003/09/16 02:42:44 cellog Exp $ require_once 'PEAR/Common.php'; require_once 'PEAR/Registry.php'; @@ -798,19 +798,23 @@ /** * Installs the files within the package file specified. * - * @param $pkgfile path to the package file + * @param string $pkgfile path to the package file + * @param array $options + * recognized options: + * - installroot : optional prefix directory for installation + * - force : force installation + * - register-only : update registry but don't install files + * - upgrade : upgrade existing install + * - soft : fail silently + * - nodeps : ignore dependency conflicts/missing dependencies + * - alldeps : install all dependencies + * - onlyreqdeps : install only required dependencies * * @return array package info if successful, null if not */ function install($pkgfile, $options = array()) { - // recognized options: - // - force : force installation - // - register-only : update registry but don't install files - // - upgrade : upgrade existing install - // - soft : fail silently - // $php_dir = $this->config->get('php_dir'); if (isset($options['installroot'])) { if (substr($options['installroot'], -1) == DIRECTORY_SEPARATOR) { @@ -928,6 +932,8 @@ } } + $this->startFileTransaction(); + if (empty($options['upgrade'])) { // checks to do only when installing new packages if (empty($options['force']) && $this->registry->packageExists($pkgname)) { @@ -1099,6 +1105,7 @@ $this->log(0, $warning); } } + $this->startFileTransaction(); // Delete the files if (PEAR::isError($err = $this->_deletePackageFiles($package))) { $this->rollbackFileTransaction();

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