cvs: pear-core / package-PEAR.xml package2.xml /PEAR/PackageFile/v2 Validator.php /PEAR/Task Postinstallscript.php
| From: | Greg Beaver | Date: | Wed, 08 Feb 2006 01:21:47 +0000 |
| Subject: | cvs: pear-core / package-PEAR.xml package2.xml /PEAR/PackageFile/v2 Validator.php /PEAR/Task Postinstallscript.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-38042@lists.php.net to get a copy of this message | ||
cellog Wed Feb 8 01:21:47 2006 UTC
Modified files:
/pear-core package-PEAR.xml package2.xml
/pear-core/PEAR/PackageFile/v2 Validator.php
/pear-core/PEAR/Task Postinstallscript.php
Log:
* fix Bug #6675: postinstallscript validation fails
http://cvs.php.net/viewcvs.cgi/pear-core/package-PEAR.xml?r1=1.343&r2=1.344&diff_format=u
Index: pear-core/package-PEAR.xml
diff -u pear-core/package-PEAR.xml:1.343 pear-core/package-PEAR.xml:1.344
--- pear-core/package-PEAR.xml:1.343 Mon Feb 6 00:36:27 2006
+++ pear-core/package-PEAR.xml Wed Feb 8 01:21:47 2006
@@ -97,6 +97,7 @@
* fix Bug #6579: PFM2 changelog and license with uri
* fix Bug #6673: pear install --offline --packagingroot=/blah does not work
* fix Bug #6674: --packagingroot always uses channel pear.php.net configuration
+ * fix Bug #6675: postinstallscript validation fails
* fix Bug #6690: channel with / will not allow upgrade
* fix Bug #6692: Optional feature install message needs channel name
</notes>
http://cvs.php.net/viewcvs.cgi/pear-core/package2.xml?r1=1.236&r2=1.237&diff_format=u
Index: pear-core/package2.xml
diff -u pear-core/package2.xml:1.236 pear-core/package2.xml:1.237
--- pear-core/package2.xml:1.236 Mon Feb 6 00:36:27 2006
+++ pear-core/package2.xml Wed Feb 8 01:21:47 2006
@@ -102,6 +102,7 @@
* fix Bug #6579: PFM2 changelog and license with uri
* fix Bug #6673: pear install --offline --packagingroot=/blah does not work
* fix Bug #6674: --packagingroot always uses channel pear.php.net configuration
+ * fix Bug #6675: postinstallscript validation fails
* fix Bug #6690: channel with / will not allow upgrade
* fix Bug #6692: Optional feature install message needs channel name
</notes>
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.84&r2=1.85&diff_format=u
Index: pear-core/PEAR/PackageFile/v2/Validator.php
diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.84
pear-core/PEAR/PackageFile/v2/Validator.php:1.85
--- pear-core/PEAR/PackageFile/v2/Validator.php:1.84 Sat Jan 28 17:33:25 2006
+++ pear-core/PEAR/PackageFile/v2/Validator.php Wed Feb 8 01:21:47 2006
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Validator.php,v 1.84 2006/01/28 17:33:25 cellog Exp $
+// $Id: Validator.php,v 1.85 2006/02/08 01:21:47 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
@@ -1713,6 +1713,8 @@
function analyzeSourceCode($file, $string = false)
{
if (!function_exists("token_get_all")) {
+ $this->_stack->push(__FUNCTION__, 'error', array('file' =>
$file),
+ 'Parser error: token_get_all() function must exist to analyze source
code');
return false;
}
if (!defined('T_DOC_COMMENT')) {
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Task/Postinstallscript.php?r1=1.17&r2=1.18&diff_format=u
Index: pear-core/PEAR/Task/Postinstallscript.php
diff -u pear-core/PEAR/Task/Postinstallscript.php:1.17
pear-core/PEAR/Task/Postinstallscript.php:1.18
--- pear-core/PEAR/Task/Postinstallscript.php:1.17 Fri Jan 6 04:47:37 2006
+++ pear-core/PEAR/Task/Postinstallscript.php Wed Feb 8 01:21:47 2006
@@ -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: Postinstallscript.php,v 1.17 2006/01/06 04:47:37 cellog Exp $
+ * @version CVS: $Id: Postinstallscript.php,v 1.18 2006/02/08 01:21:47 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -80,10 +80,14 @@
$fileXml['name'] . '" could not be retrieved for
processing!');
} else {
$analysis = $pkg->analyzeSourceCode($file, true);
- if (PEAR::isError($analysis)) {
+ if (!$analysis) {
PEAR::popErrorHandling();
+ $warnings = '';
+ foreach ($pkg->getValidationWarnings() as $warn) {
+ $warnings .= $warn['message'] . "\n";
+ }
return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script
"' .
- $fileXml['name'] . '" failed');
+ $fileXml['name'] . '" failed: ' . $warnings);
}
if (count($analysis['declared_classes']) != 1) {
PEAR::popErrorHandling();