FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18309&edit=1

ID: 18309
Updated by: helgith@gmail.com
Reported By: jan at horde dot org
Summary: Cannot install validation package because installer
tries to validate it
Status: Open
Type: Bug
Package: PEAR
Package Version: 1.9.1
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

Do you have an example custom validation which reproduces the problem?
Would be
useful to write tests.


Previous Comments:
------------------------------------------------------------------------

[2011-02-24 18:20:01] yunosh

Added #patch
bug:18309;patch:fix_validator_installation.diff;revision:1298571601;.

------------------------------------------------------------------------

[2011-02-24 16:04:16] yunosh

Description:
------------
To avoid the chicken-and-egg problem, the PEAR installer is supposed to
always validate channel validator packages with PEAR_Validate. The
detection of validator packages is broken though.

The check is done in PEAR_ChannelFile::getValidationObject():

if ($package == $this->_channelInfo['validatepackage']) {
// channel validation packages are always validated by
PEAR_Validate
$val = &new PEAR_Validate;
return $val;
}

This check is broken in two ways though.
1) The package name is in
$this->_channelInfo['validatepackage']['_content'] not
$this->_channelInfo['validatepackage'].
2) $package is not passed as a parameter to this method.

The method is called from PEAR_Registry::parsePackageName():

$validate = $chan->getValidationObject();

This should be:

$validate = $chan->getValidationObject($param['package']);

As a side-note, everything breaks completely with a fatal error, because
getValidationObject() might return false, which happens in this case,
yet the return value is unconditionally used as an object in
parsePackageName().

I don't see a workaround, so <validatepackage> support is completey
brocken at the moment.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 27, '11 at 3:13p
activeFeb 27, '11 at 3:13p
posts1
users1
websitepear.php.net

1 user in discussion

Helgith: 1 post

People

Translate

site design / logo © 2022 Grokbase