cvs: php-src /pear/PEAR Installer.php
| From: | Greg Beaver | Date: | Tue, 16 Sep 2003 03:27:55 +0000 |
| Subject: | cvs: php-src /pear/PEAR Installer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12770@lists.php.net to get a copy of this message | ||
cellog Mon Sep 15 23:27:55 2003 EDT
Modified files:
/php-src/pear/PEAR Installer.php
Log:
tweak Tomas's patch for
$ pear install Package-v.tgz
which should work for local files first before checking to see if it can be downloaded
Index: php-src/pear/PEAR/Installer.php
diff -u php-src/pear/PEAR/Installer.php:1.120 php-src/pear/PEAR/Installer.php:1.121
--- php-src/pear/PEAR/Installer.php:1.120 Mon Sep 15 23:17:08 2003
+++ php-src/pear/PEAR/Installer.php Mon Sep 15 23:27:55 2003
@@ -18,7 +18,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.120 2003/09/16 03:17:08 cellog Exp $
+// $Id: Installer.php,v 1.121 2003/09/16 03:27:55 cellog Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
@@ -657,20 +657,20 @@
// download files in this list if necessary
foreach($packages as $pkgfile) {
- $origpkgfile = $pkgfile;
- $pkgfile = $this->extractDownloadFileName($pkgfile, $version);
- if ($version === null) {
- // use preferred state if no version number was specified
- $version = $state;
- }
- if ($this->validPackageName($pkgfile) &&
!isset($options['upgrade'])) {
- if ($this->registry->packageExists($pkgfile)) {
- $this->log(0, "Package '$pkgfile' already installed,
skipping");
- // ignore dependencies that are installed unless we are upgrading
- continue;
+ if (!is_file($pkgfile)) {
+ $origpkgfile = $pkgfile;
+ $pkgfile = $this->extractDownloadFileName($pkgfile, $version);
+ if ($version === null) {
+ // use preferred state if no version number was specified
+ $version = $state;
+ }
+ if ($this->validPackageName($pkgfile) &&
!isset($options['upgrade'])) {
+ if ($this->registry->packageExists($pkgfile)) {
+ $this->log(0, "Package '$pkgfile' already installed,
skipping");
+ // ignore dependencies that are installed unless we are upgrading
+ continue;
+ }
}
- }
- if (!@is_file($pkgfile)) {
$pkgfile = $this->_downloadFile($pkgfile, $config, $options, $errors,
$version, $origpkgfile, $state);
if (PEAR::isError($pkgfile)) {