cvs: php4 /pear/PEAR Packager.php
| From: | Thomas V.V.Cox | Date: | Sat, 01 Dec 2001 17:55:47 +0000 |
| Subject: | cvs: php4 /pear/PEAR Packager.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1446@lists.php.net to get a copy of this message | ||
cox Sat Dec 1 12:55:47 2001 EDT
Modified files:
/php4/pear/PEAR Packager.php
Log:
check for version for not building broken packages (thanks Markus)
Index: php4/pear/PEAR/Packager.php
diff -u php4/pear/PEAR/Packager.php:1.20 php4/pear/PEAR/Packager.php:1.21
--- php4/pear/PEAR/Packager.php:1.20 Mon Nov 5 19:22:18 2001
+++ php4/pear/PEAR/Packager.php Sat Dec 1 12:55:47 2001
@@ -18,7 +18,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Packager.php,v 1.20 2001/11/06 00:22:18 cox Exp $
+// $Id: Packager.php,v 1.21 2001/12/01 17:55:47 cox Exp $
require_once 'PEAR/Common.php';
@@ -105,6 +105,12 @@
$pkginfo = $this->infoFromDescriptionFile($pkgfile);
if (PEAR::isError($pkginfo)) {
return $pkginfo;
+ }
+ // XXX This needs to be checked in infoFromDescriptionFile
+ // or at least a helper method to do the proper checks
+ if (empty($pkginfo['version'])) {
+ return $this->raiseError("No version information found in $pkgfile",
+ null, PEAR_ERROR_TRIGGER, E_USER_ERROR);
}
// TMP DIR -------------------------------------------------
// We allow calls like "pear package /home/user/mypack/package.xml"