cvs: pear-core / package-PEAR.xml package2.xml /PEAR/Installer/Role Cfg.php

From: Date: Thu, 13 Mar 2008 15:45:18 +0000
Subject: cvs: pear-core / package-PEAR.xml package2.xml /PEAR/Installer/Role Cfg.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7333@lists.php.net to get a copy of this message
timj Thu Mar 13 15:45:18 2008 UTC Modified files: /pear-core package2.xml package-PEAR.xml /pear-core/PEAR/Installer/Role Cfg.php Log: Fix bug #13315: Upgrading of package fails if more than one file of role=cfg has changed http://cvs.php.net/viewvc.cgi/pear-core/package2.xml?r1=1.418&r2=1.419&diff_format=u Index: pear-core/package2.xml diff -u pear-core/package2.xml:1.418 pear-core/package2.xml:1.419 --- pear-core/package2.xml:1.418 Tue Mar 11 22:04:32 2008 +++ pear-core/package2.xml Thu Mar 13 15:45:17 2008 @@ -98,6 +98,7 @@ <license uri="http://www.php.net/license">PHP License</license> <notes> * Implement Request #13375: install-pear.php should have option to set cfg_dir [timj] + * Fix bug #13315: Upgrading of package fails if more than one file of role=cfg has changed [timj] </notes> <contents> <dir name="/"> http://cvs.php.net/viewvc.cgi/pear-core/package-PEAR.xml?r1=1.518&r2=1.519&diff_format=u Index: pear-core/package-PEAR.xml diff -u pear-core/package-PEAR.xml:1.518 pear-core/package-PEAR.xml:1.519 --- pear-core/package-PEAR.xml:1.518 Tue Mar 11 22:04:32 2008 +++ pear-core/package-PEAR.xml Thu Mar 13 15:45:17 2008 @@ -93,6 +93,7 @@ <state>stable</state> <notes> * Implement Request #13375: install-pear.php should have option to set cfg_dir [timj] + * Fix bug #13315: Upgrading of package fails if more than one file of role=cfg has changed [timj] </notes> <provides type="class" name="OS_Guess"/> <provides type="class" name="System"/> http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Installer/Role/Cfg.php?r1=1.4&r2=1.5&diff_format=u Index: pear-core/PEAR/Installer/Role/Cfg.php diff -u pear-core/PEAR/Installer/Role/Cfg.php:1.4 pear-core/PEAR/Installer/Role/Cfg.php:1.5 --- pear-core/PEAR/Installer/Role/Cfg.php:1.4 Thu Jan 3 20:26:36 2008 +++ pear-core/PEAR/Installer/Role/Cfg.php Thu Mar 13 15:45:18 2008 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 2007-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Cfg.php,v 1.4 2008/01/03 20:26:36 cellog Exp $ + * @version CVS: $Id: Cfg.php,v 1.5 2008/03/13 15:45:18 timj Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.7.0 */ @@ -71,20 +71,19 @@ } else { $newloc = $tmpcfg; } - if (!@copy($old, $newloc . DIRECTORY_SEPARATOR . 'savefile')) { + $temp_file = $newloc . DIRECTORY_SEPARATOR . uniqid('savefile'); + if (!@copy($old, $temp_file)) { PEAR::popErrorHandling(); return PEAR::raiseError('Could not save existing configuration file '. $old . ', unable to install. Please set temp_dir ' . 'configuration variable to a writeable location and try again'); } PEAR::popErrorHandling(); - $this->installer->addFileOperation('rename', - array($newloc . DIRECTORY_SEPARATOR . 'savefile', $old, false - )); - $this->installer->addFileOperation('delete', array($newloc . DIRECTORY_SEPARATOR . 'savefile')); + $this->installer->addFileOperation('rename', array($temp_file, $old, false)); + $this->installer->addFileOperation('delete', array($temp_file)); } } return $test; } } -?> \ No newline at end of file +?>

« previous php.pear.core (#7333) next »