cvs: pear-core /PEAR Dependency2.php

From: Date: Mon, 23 May 2005 04:09:40 +0000
Subject: cvs: pear-core /PEAR Dependency2.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-32036@lists.php.net to get a copy of this message
cellog Mon May 23 00:09:40 2005 EDT Modified files: /pear-core/PEAR Dependency2.php Log: get smarter with error message http://cvs.php.net/diff.php/pear-core/PEAR/Dependency2.php?r1=1.42&r2=1.43&ty=u Index: pear-core/PEAR/Dependency2.php diff -u pear-core/PEAR/Dependency2.php:1.42 pear-core/PEAR/Dependency2.php:1.43 --- pear-core/PEAR/Dependency2.php:1.42 Sat May 21 00:34:11 2005 +++ pear-core/PEAR/Dependency2.php Mon May 23 00:09:39 2005 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Dependency2.php,v 1.42 2005/05/21 04:34:11 cellog Exp $ + * @version CVS: $Id: Dependency2.php,v 1.43 2005/05/23 04:09:39 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -676,12 +676,17 @@ if ($installed || $downloaded) { $installed = $installed ? 'installed' : 'downloaded'; if (isset($dep['conflicts'])) { + if ($version) { + $rest = ", $installed version is " . $version; + } else { + $rest = ''; + } if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { return $this->raiseError('%s conflicts with package "' . $depname . '"' . - $extra . ", $installed version is " . $version); + $extra . $rest); } else { return $this->warning('warning: %s conflicts with package "' . $depname . '"' . - $extra . ", $installed version is " . $version); + $extra . $rest); } } return true;

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