cvs: php4 /pear/PEAR Installer.php
| From: | Tomas V.V.Cox | Date: | Wed, 19 Jun 2002 22:51:42 +0000 |
| Subject: | cvs: php4 /pear/PEAR Installer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4695@lists.php.net to get a copy of this message | ||
cox Wed Jun 19 18:51:42 2002 EDT
Modified files:
/php4/pear/PEAR Installer.php
Log:
Do NOT allow install packages with errors in its description file
Index: php4/pear/PEAR/Installer.php
diff -u php4/pear/PEAR/Installer.php:1.68 php4/pear/PEAR/Installer.php:1.69
--- php4/pear/PEAR/Installer.php:1.68 Fri Jun 14 19:18:04 2002
+++ php4/pear/PEAR/Installer.php Wed Jun 19 18:51:29 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.68 2002/06/14 23:18:04 cox Exp $
+// $Id: Installer.php,v 1.69 2002/06/19 22:51:29 cox Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
@@ -182,7 +182,8 @@
$this->source_files++;
return;
default:
- break;
+ // Files with no role will end in "/"
+ return $this->raiseError("Invalid role `$atts[role]' for file
$file");
}
if (!empty($atts['baseinstalldir'])) {
$dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
@@ -393,6 +394,12 @@
$pkginfo = $this->infoFromDescriptionFile($descfile);
if (PEAR::isError($pkginfo)) {
return $pkginfo;
+ }
+ $this->validatePackageInfo($pkginfo, $errors, $warnings);
+ // XXX We allow warnings, have we to do it?
+ if (count($errors)) {
+ return $this->raiseError("The following errors where found:\n".
+ implode("\n", $errors));
}
$pkgname = $pkginfo['package'];