Browse Source

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
PEAR_1_4DEV
Greg Beaver 23 years ago
parent
commit
f4aaa7c4f0
  1. 26
      pear/PEAR/Installer.php

26
pear/PEAR/Installer.php

@ -657,20 +657,20 @@ class PEAR_Installer extends PEAR_Common
// 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)) {

Loading…
Cancel
Save