cvs: pear-core /PEAR/Downloader Package.php
| From: | Greg Beaver | Date: | Fri, 19 Aug 2005 19:12:31 +0000 |
| Subject: | cvs: pear-core /PEAR/Downloader Package.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-3653@lists.php.net to get a copy of this message | ||
cellog Fri Aug 19 15:12:31 2005 EDT
Modified files:
/pear-core/PEAR/Downloader Package.php
Log:
allow for installation of dependency groups from a local package.xml
file or .tgz file
http://cvs.php.net/diff.php/pear-core/PEAR/Downloader/Package.php?r1=1.79&r2=1.80&ty=u
Index: pear-core/PEAR/Downloader/Package.php
diff -u pear-core/PEAR/Downloader/Package.php:1.79 pear-core/PEAR/Downloader/Package.php:1.80
--- pear-core/PEAR/Downloader/Package.php:1.79 Tue May 31 23:13:32 2005
+++ pear-core/PEAR/Downloader/Package.php Fri Aug 19 15:12:29 2005
@@ -15,7 +15,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Package.php,v 1.79 2005/06/01 03:13:32 cellog Exp $
+ * @version CVS: $Id: Package.php,v 1.80 2005/08/19 19:12:29 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -1263,6 +1263,14 @@
function _fromFile($param)
{
+ if (!@is_file($param)) {
+ $test = explode('#', $param);
+ $group = array_pop($test);
+ if (@is_file(implode('#', $test))) {
+ $this->setGroup($group);
+ $param = implode('#', $test);
+ }
+ }
if (@is_file($param)) {
$this->_type = 'local';
$options = $this->_downloader->getOptions();
@@ -1281,7 +1289,9 @@
return $pf;
}
$this->_packagefile = &$pf;
- $this->setGroup('default'); // install the default dependency group
+ if (!$this->getGroup()) {
+ $this->setGroup('default'); // install the default dependency group
+ }
return $this->_valid = true;
}
return $this->_valid = false;