PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PEAR » PEAR » Bug #6675

postinstallscript validation fails

Details

Submitted2006-02-02 17:53 UTC
Fromhans at velum dot ent
Assignedcellog
StatusNo Feedback
PackagePEAR
PHP Version5.1.2
OSGentoo Linux
Roadmaps(Not assigned)

Comments

[2006-02-02 17:53 UTC] hans at velum dot ent

Description:
------------
When attempting to install a package that uses <task:postinstallscript> I get errors like this (I'm trying to install Chiara_PEAR_Server):

task <tasks:postinstallscript> in file Server/mysqlinstall.php is invalid because of "Post-install script "Server/mysqlinstall.php" must declare exactly 1 class"
Parsing of package.xml from file "/tmp/tmpOvtlaj/package.xml" failed
Cannot initialize 'Chiara_PEAR_Server-0.18.3.tgz', invalid or missing package file
Package "Chiara_PEAR_Server-0.18.3.tgz" is not valid
install failed

Well, Server/mysqlinstall.php does declare exactly 1 class.

This would appear to be a bug in PEAR_Task_Postinstallscript and/or PEAR_PackageFile_v2 (depending on how you look at it).

What seems to be the problem:

On/around line 82, PEAR_Task_Postinstallscript calls $pkg->analyzeSourceCode($file, true);

$file is the contents of the file, not the file _name_ which appears to be what is expected by PEAR_PackageFile_v2.

[2006-02-06 21:25 UTC] hans at velum dot ent

When I upgrade PEAR per CVS instructions (which incidentally seem wrong, since 'anoncvs' is not a valid CVS user), I get the same error. Furthermore after the upgrade (which it says was successful), PEAR is still at version 1.4.7.

[2006-02-07 15:50 UTC] hans at velum dot ent

oh, ok, my apologies.

yes, I think this is a differnet type of bug afterall. I am missing the tokenizer and the analyzeSourceCode() in the validator is returning false if the tokenizer is not present. -- It also returns false if it can't open the file, which is I think what made me think it was related to the param type. I see the error of my ways, though, by the if ($string) check :)