cvs: php-src /pear/PEAR Common.php
| From: | Greg Beaver | Date: | Sat, 12 Jun 2004 06:15:55 +0000 |
| Subject: | cvs: php-src /pear/PEAR Common.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-387@lists.php.net to get a copy of this message | ||
cellog Sat Jun 12 02:15:55 2004 EDT
Modified files:
/php-src/pear/PEAR Common.php
Log:
fix bug #1610: pear package doesn't validate deps
It was never validating deps at all!
http://cvs.php.net/diff.php/php-src/pear/PEAR/Common.php?r1=1.125&r2=1.126&ty=u
Index: php-src/pear/PEAR/Common.php
diff -u php-src/pear/PEAR/Common.php:1.125 php-src/pear/PEAR/Common.php:1.126
--- php-src/pear/PEAR/Common.php:1.125 Fri May 21 12:36:37 2004
+++ php-src/pear/PEAR/Common.php Sat Jun 12 02:15:55 2004
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.125 2004/05/21 16:36:37 wez Exp $
+// $Id: Common.php,v 1.126 2004/06/12 06:15:55 cellog Exp $
require_once 'PEAR.php';
require_once 'Archive/Tar.php';
@@ -1115,24 +1115,24 @@
$i++;
}
}
- if (!empty($info['deps'])) {
+ if (!empty($info['release_deps'])) {
$i = 1;
- foreach ($info['deps'] as $d) {
+ foreach ($info['release_deps'] as $d) {
if (empty($d['type'])) {
$errors[] = "dependency $i: missing type";
} elseif (!in_array($d['type'], PEAR_Common::getDependencyTypes())) {
- $errors[] = "dependency $i: invalid type, should be one of: " .
+ $errors[] = "dependency $i: invalid type '$d[type]', should be
one of: " .
implode(' ', PEAR_Common::getDependencyTypes());
}
if (empty($d['rel'])) {
$errors[] = "dependency $i: missing relation";
} elseif (!in_array($d['rel'], PEAR_Common::getDependencyRelations())) {
- $errors[] = "dependency $i: invalid relation, should be one of: "
+ $errors[] = "dependency $i: invalid relation '$d[rel]', should
be one of: "
. implode(' ', PEAR_Common::getDependencyRelations());
}
if (!empty($d['optional'])) {
if (!in_array($d['optional'], array('yes',
'no'))) {
- $errors[] = "dependency $i: invalid relation optional attribute,
should be one of: yes no";
+ $errors[] = "dependency $i: invalid relation optional attribute
'$d[optional]', should be one of: yes no";
}
}
if ($d['rel'] != 'has' &&
empty($d['version'])) {