cvs: pear-core /PEAR Installer.php /PEAR/Command Registry.php /PEAR/Installer Role.php /PEAR/PackageFile v2.php /PEAR/PackageFile/Parser v1.php
/PEAR/PackageFile/v2 Validator.php

From: Date: Thu, 04 Nov 2004 19:10:32 +0000
Subject: cvs: pear-core /PEAR Installer.php /PEAR/Command Registry.php /PEAR/Installer Role.php /PEAR/PackageFile v2.php /PEAR/PackageFile/Parser v1.php
/PEAR/PackageFile/v2 Validator.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-25675@lists.php.net to get a copy of this message
cellog Thu Nov 4 14:10:32 2004 EDT Modified files: /pear-core/PEAR/Command Registry.php /pear-core/PEAR Installer.php /pear-core/PEAR/Installer Role.php /pear-core/PEAR/PackageFile/Parser v1.php /pear-core/PEAR/PackageFile v2.php /pear-core/PEAR/PackageFile/v2 Validator.php Log: remove PEAR_PackageFile_v2->getReleaseType() in favor of clearer getPackageType() http://cvs.php.net/diff.php/pear-core/PEAR/Command/Registry.php?r1=1.46&r2=1.47&ty=u Index: pear-core/PEAR/Command/Registry.php diff -u pear-core/PEAR/Command/Registry.php:1.46 pear-core/PEAR/Command/Registry.php:1.47 --- pear-core/PEAR/Command/Registry.php:1.46 Wed Oct 27 01:11:12 2004 +++ pear-core/PEAR/Command/Registry.php Thu Nov 4 14:10:32 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.46 2004/10/27 05:11:12 cellog Exp $ +// $Id: Registry.php,v 1.47 2004/11/04 19:10:32 cellog Exp $ require_once 'PEAR/Command/Common.php'; require_once 'PEAR/Registry.php'; @@ -513,7 +513,7 @@ $data = array( 'caption' => $caption, 'border' => true); - switch ($obj->getReleaseType()) { + switch ($obj->getPackageType()) { case 'php' : $release = 'PEAR-style PHP-based Package'; break; @@ -874,7 +874,7 @@ } } } - if ($obj->getReleaseType() == 'bundle') { + if ($obj->getPackageType() == 'bundle') { $info['Bundled Packages'] = ''; foreach ($obj->getBundledPackages() as $package) { if (!empty($info['Bundled Packages'])) { http://cvs.php.net/diff.php/pear-core/PEAR/Installer.php?r1=1.172&r2=1.173&ty=u Index: pear-core/PEAR/Installer.php diff -u pear-core/PEAR/Installer.php:1.172 pear-core/PEAR/Installer.php:1.173 --- pear-core/PEAR/Installer.php:1.172 Sun Oct 31 14:27:43 2004 +++ pear-core/PEAR/Installer.php Thu Nov 4 14:10:32 2004 @@ -19,7 +19,7 @@ // | Greg Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Installer.php,v 1.172 2004/10/31 19:27:43 cellog Exp $ +// $Id: Installer.php,v 1.173 2004/11/04 19:10:32 cellog Exp $ require_once 'PEAR/Downloader.php'; require_once 'PEAR/Task/Common.php'; @@ -418,7 +418,7 @@ $channel = $pkg->getChannel(); // {{{ assemble the destination paths if (!in_array($atts['attribs']['role'], - PEAR_Installer_Role::getValidRoles($pkg->getReleaseType()))) { + PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) { return $this->raiseError('Invalid role `' . $atts['attribs']['role'] . "' for file $file"); } http://cvs.php.net/diff.php/pear-core/PEAR/Installer/Role.php?r1=1.1&r2=1.2&ty=u Index: pear-core/PEAR/Installer/Role.php diff -u pear-core/PEAR/Installer/Role.php:1.1 pear-core/PEAR/Installer/Role.php:1.2 --- pear-core/PEAR/Installer/Role.php:1.1 Thu Sep 30 15:22:08 2004 +++ pear-core/PEAR/Installer/Role.php Thu Nov 4 14:10:32 2004 @@ -36,7 +36,7 @@ if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { PEAR_Installer_Role::registerRoles(); } - if (!in_array($role, PEAR_Installer_Role::getValidRoles($pkg->getReleaseType()))) { + if (!in_array($role, PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) { $a = false; return $a; } http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/Parser/v1.php?r1=1.9&r2=1.10&ty=u Index: pear-core/PEAR/PackageFile/Parser/v1.php diff -u pear-core/PEAR/PackageFile/Parser/v1.php:1.9 pear-core/PEAR/PackageFile/Parser/v1.php:1.10 --- pear-core/PEAR/PackageFile/Parser/v1.php:1.9 Thu Oct 28 19:53:29 2004 +++ pear-core/PEAR/PackageFile/Parser/v1.php Thu Nov 4 14:10:32 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: v1.php,v 1.9 2004/10/28 23:53:29 cellog Exp $ +// $Id: v1.php,v 1.10 2004/11/04 19:10:32 cellog Exp $ require_once 'PEAR/PackageFile/v1.php'; /** @@ -265,10 +265,6 @@ $this->_packageInfo['packagerversion'] = $attribs['packagerversion']; } break; - case 'name' : - if (isset($attribs['extends'])) { - $this->_packageInfo['extends'] = trim($attribs['extends']); - } } } @@ -300,6 +296,9 @@ break; } break; + case 'extends' : + $this->_packageInfo['extends'] = $data; + break; case 'summary': $this->_packageInfo['summary'] = $data; break; http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2.php?r1=1.40&r2=1.41&ty=u Index: pear-core/PEAR/PackageFile/v2.php diff -u pear-core/PEAR/PackageFile/v2.php:1.40 pear-core/PEAR/PackageFile/v2.php:1.41 --- pear-core/PEAR/PackageFile/v2.php:1.40 Sun Oct 31 14:27:45 2004 +++ pear-core/PEAR/PackageFile/v2.php Thu Nov 4 14:10:32 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: v2.php,v 1.40 2004/10/31 19:27:45 cellog Exp $ +// $Id: v2.php,v 1.41 2004/11/04 19:10:32 cellog Exp $ require_once 'PEAR/ErrorStack.php'; require_once 'PEAR/Validate.php'; require_once 'PEAR/PackageFile/Generator/v2.php'; @@ -1941,22 +1941,6 @@ return '2.0'; } - function getReleaseType() - { - if (isset($this->_packageInfo['phprelease'])) { - return 'php'; - } - if (isset($this->_packageInfo['extsrcrelease'])) { - return 'extsrc'; - } - if (isset($this->_packageInfo['extbinrelease'])) { - return 'extbin'; - } - if (isset($this->_packageInfo['bundle'])) { - return 'bundle'; - } - } - function getSourcePackage() { if (isset($this->_packageInfo['extbinrelease'])) { http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.4&r2=1.5&ty=u Index: pear-core/PEAR/PackageFile/v2/Validator.php diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.4 pear-core/PEAR/PackageFile/v2/Validator.php:1.5 --- pear-core/PEAR/PackageFile/v2/Validator.php:1.4 Wed Nov 3 17:28:20 2004 +++ pear-core/PEAR/PackageFile/v2/Validator.php Thu Nov 4 14:10:32 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Validator.php,v 1.4 2004/11/03 22:28:20 cellog Exp $ +// $Id: Validator.php,v 1.5 2004/11/04 19:10:32 cellog Exp $ /** * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller @@ -940,7 +940,7 @@ */ function _validateRole($role) { - return in_array($role, PEAR_Installer_Role::getValidRoles($this->_pf->getReleaseType())); + return in_array($role, PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())); } function _invalidTagOrder($oktags, $actual, $root) @@ -981,7 +981,7 @@ { $this->_stack->push(__FUNCTION__, 'error', array( 'file' => $file, 'dir' => $dir, 'role' => $role, - 'roles' => PEAR_Installer_Role::getValidRoles($this->_pf->getReleaseType())), + 'roles' => PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())), 'File "%file%" in directory "%dir%" has invalid role "%role%", should be one of %roles%'); }

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