![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| cellog Thu May 10 00:32:19 2007 UTC Modified files: /pear-core package-PEAR.xml package2.xml /pear-core/PEAR Downloader.php /pear-core/PEAR/Downloader Package.php Log: * fix Bug #10857: Structures_Graph_Node::getMetadata: Requested key does not exist [cellog] http://cvs.php.net/viewvc.cgi/pear-c...&diff_format=u Index: pear-core/package-PEAR.xml diff -u pear-core/package-PEAR.xml:1.456 pear-core/package-PEAR.xml:1.457 --- pear-core/package-PEAR.xml:1.456 Thu May 10 00:00:38 2007 +++ pear-core/package-PEAR.xml Thu May 10 00:32:19 2007 @@ -84,13 +84,15 @@ <state>stable</state> <notes> * fix Bug #10846: Wont upgrade Text_Wiki from RC1 to RC2 [tias] - * fix Bug #10780: wrong output from PEAR_Exception [cellog] + * fix Bug #10857: Structures_Graph_Node::getMetadata: Requested + key does not exist [cellog] * fix Bug #10865: using --packagingroot regression [tias/cellog] + * fix Bug #10780: wrong output from PEAR_Exception [cellog] * fix Bug #10873: pear channel-discover broken - pear temp directories not writeable [cellog] + * fix Bug #10938: Invalid package.xml creates wrong package [cellog] * implement Request #10373: if pref_state=stable and installed package=beta, allow up to latest beta version [tias] - * fix Bug #10938: Invalid package.xml creates wrong package [cellog] </notes> <provides type="class" name="OS_Guess"/> <provides type="class" name="System"/> http://cvs.php.net/viewvc.cgi/pear-c...&diff_format=u Index: pear-core/package2.xml diff -u pear-core/package2.xml:1.354 pear-core/package2.xml:1.355 --- pear-core/package2.xml:1.354 Thu May 10 00:00:38 2007 +++ pear-core/package2.xml Thu May 10 00:32:19 2007 @@ -89,8 +89,10 @@ <license uri="http://www.php.net/license">PHP License</license> <notes> * fix Bug #10846: Wont upgrade Text_Wiki from RC1 to RC2 [tias] - * fix Bug #10780: wrong output from PEAR_Exception [cellog] + * fix Bug #10857: Structures_Graph_Node::getMetadata: Requested + key does not exist [cellog] * fix Bug #10865: using --packagingroot regression [tias/cellog] + * fix Bug #10780: wrong output from PEAR_Exception [cellog] * fix Bug #10873: pear channel-discover broken - pear temp directories not writeable [cellog] * fix Bug #10938: Invalid package.xml creates wrong package [cellog] http://cvs.php.net/viewvc.cgi/pear-c...&diff_format=u Index: pear-core/PEAR/Downloader.php diff -u pear-core/PEAR/Downloader.php:1.124 pear-core/PEAR/Downloader.php:1.125 --- pear-core/PEAR/Downloader.php:1.124 Wed Mar 21 06:24:52 2007 +++ pear-core/PEAR/Downloader.php Thu May 10 00:32:19 2007 @@ -18,7 +18,7 @@ * @author Martin Jansen <mj@php.net> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Downloader.php,v 1.124 2007/03/21 06:24:52 cellog Exp $ + * @version CVS: $Id: Downloader.php,v 1.125 2007/05/10 00:32:19 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.0 */ @@ -383,6 +383,17 @@ } while (PEAR_Downloader_Package::mergeDependencies($param s)); PEAR_Downloader_Package::removeDuplicates($params, true); + $errorparams = array(); + if (PEAR_Downloader_Package::detectStupidDuplicates($ params, $errorparams)) { + if (count($errorparams)) { + foreach ($errorparams as $param) { + $name = $this->_registry->parsedPackageNameToString($param->getParsedPackage()); + $this->pushError('Duplicate package ' . $name . ' found', PEAR_INSTALLER_FAILED); + } + $a = array(); + return $a; + } + } PEAR_Downloader_Package::removeInstalled($params); if (!count($params)) { $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED); http://cvs.php.net/viewvc.cgi/pear-c...&diff_format=u Index: pear-core/PEAR/Downloader/Package.php diff -u pear-core/PEAR/Downloader/Package.php:1.107 pear-core/PEAR/Downloader/Package.php:1.108 --- pear-core/PEAR/Downloader/Package.php:1.107 Tue Apr 17 22:43:42 2007 +++ pear-core/PEAR/Downloader/Package.php Thu May 10 00:32:19 2007 @@ -15,7 +15,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: Package.php,v 1.107 2007/04/17 22:43:42 cellog Exp $ + * @version CVS: $Id: Package.php,v 1.108 2007/05/10 00:32:19 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -1147,6 +1147,39 @@ } /** + * Detect duplicate package names with differing versions + * + * If a user requests to install Date 1.4.6 and Date 1.4.7, + * for instance, this is a logic error. This method + * detects this situation. + * + * @param array $params array of PEAR_Downloader_Package objects + * @param array $errorparams empty array + * @return array array of stupid duplicated packages in PEAR_Downloader_Package obejcts + */ + function detectStupidDuplicates($params, &$errorparams) + { + $existing = array(); + foreach ($params as $i => $param) { + $existing[$param->getChannel() . '/' . $param->getPackage()] + [$param->getGroup()][] = $i; + } + $indices = array(); + foreach ($existing as $package => $groups) { + foreach ($groups as $group => $dupes) { + if (count($dupes) > 1) { + $indices = $indices + $dupes; + } + } + } + $indices = array_unique($indices); + foreach ($indices as $index) { + $errorparams[] = $params[$index]; + } + return count($errorparams); + } + + /** * @param array * @param bool ignore install groups - for final removal of dupe packages * @static | |||
| Featured Websites | ||||
|
![]() |
| Tags: cvs, downloaderphp, package2xml, packagepearxml, packagephp, pear, pearcore, peardownloader |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cvs: pear-core / package-PEAR.xml package2.xml /PEAR Installer.php /PEAR/PackageFile v1.php /PEAR/PackageFile/v2 Validator.php | Greg Beaver | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear /PHP_CodeSniffer package.xml /PHP_CodeSniffer/CodeSniffer/CommentParser AbstractParser.php | Greg Sherwood | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear /PHP_CodeSniffer CodeSniffer.php package.xml /PHP_CodeSniffer/scripts phpcs | Greg Sherwood | Pear | 0 | 05-20-2007 7:42 PM |
| cvs: pear /PHP_CodeSniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting FileCommentSniff.php | Greg Sherwood | Pear | 0 | 05-20-2007 7:41 PM |
| [PEAR-DEV] Associative arrays and PEAR SOAP | Adam Ashley | Pear | 0 | 05-20-2007 7:41 PM |
| Featured Websites | ||||
|