cvs: pear-core /PEAR/Command Package.php
| From: | Greg Beaver | Date: | Fri, 29 Oct 2004 04:14:41 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Package.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-1194@lists.php.net to get a copy of this message | ||
cellog Fri Oct 29 00:14:41 2004 EDT
Modified files:
/pear-core/PEAR/Command Package.php
Log:
add ability to specify both package.xml's for passing in
package.xml and package2.xml
http://cvs.php.net/diff.php/pear-core/PEAR/Command/Package.php?r1=1.77&r2=1.78&ty=u
Index: pear-core/PEAR/Command/Package.php
diff -u pear-core/PEAR/Command/Package.php:1.77 pear-core/PEAR/Command/Package.php:1.78
--- pear-core/PEAR/Command/Package.php:1.77 Fri Oct 22 02:29:22 2004
+++ pear-core/PEAR/Command/Package.php Fri Oct 29 00:14:41 2004
@@ -18,7 +18,7 @@
// | Greg Beaver <cellog@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Package.php,v 1.77 2004/10/22 06:29:22 cellog Exp $
+// $Id: Package.php,v 1.78 2004/10/29 04:14:41 cellog Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Command/Common.php';
@@ -42,9 +42,13 @@
'doc' => 'Print the name of the packaged file.',
),
),
- 'doc' => '[descfile]
+ 'doc' => '[descfile] [descfile2]
Creates a PEAR package from its description file (usually called
-package.xml).
+package.xml). If a second packagefile is passed in, then
+the packager will check to make sure that one is a package.xml
+version 1.0, and the other is a package.xml version 2.0. The
+package.xml version 1.0 will be saved as "package.xml" in the archive,
+and the other as "package2.xml" in the archive"
'
),
'package-validate' => array(
@@ -276,12 +280,13 @@
include_once 'PEAR/Packager.php';
include_once 'PEAR/Registry.php';
$pkginfofile = isset($params[0]) ? $params[0] : 'package.xml';
+ $pkg2 = isset($params[1]) ? $params[1] : null;
$packager =& new PEAR_Packager();
$reg = &$this->config->getRegistry();
$err = $warn = array();
$dir = dirname($pkginfofile);
$compress = empty($options['nocompress']) ? true : false;
- $result = $packager->package($pkginfofile, $compress);
+ $result = $packager->package($pkginfofile, $compress, $pkg2);
if (PEAR::isError($result)) {
$this->ui->outputData($this->output, $command);
return $this->raiseError($result);