summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2006-05-22 11:17:02 +0000
committerGreg Beaver <cellog@php.net>2006-05-22 11:17:02 +0000
commitbb31f21dfb913f083ef5e440ba5245a7bd175a04 (patch)
treee3baf5f2a74bd59a7574dacd522e2fc57596a57f
parent5fb5cfdbca3a21414050638313549789c42bdac2 (diff)
downloadphp-git-bb31f21dfb913f083ef5e440ba5245a7bd175a04.tar.gz
fix PEAR build
-rw-r--r--pear/PEAR/Downloader.php4
-rw-r--r--pear/PEAR/PackageFile/v2/Validator.php6
-rw-r--r--pear/PEAR/REST.php4
-rw-r--r--pear/install-pear.php14
4 files changed, 20 insertions, 8 deletions
diff --git a/pear/PEAR/Downloader.php b/pear/PEAR/Downloader.php
index 1846f71055..dcfab961b9 100644
--- a/pear/PEAR/Downloader.php
+++ b/pear/PEAR/Downloader.php
@@ -1395,7 +1395,7 @@ class PEAR_Downloader extends PEAR_Common
$ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
}
$request .= "Host: $host:$port\r\n" . $ifmodifiedsince .
- "User-Agent: PEAR/@package_version@/PHP/" . PHP_VERSION . "\r\n";
+ "User-Agent: PEAR/1.4.9/PHP/" . PHP_VERSION . "\r\n";
if (isset($this)) { // only pass in authentication for non-static calls
$username = $config->get('username');
$password = $config->get('password');
@@ -1507,4 +1507,4 @@ class PEAR_Downloader extends PEAR_Common
}
// }}}
-?> \ No newline at end of file
+?>
diff --git a/pear/PEAR/PackageFile/v2/Validator.php b/pear/PEAR/PackageFile/v2/Validator.php
index 5be75f8478..1ba3c4d2e9 100644
--- a/pear/PEAR/PackageFile/v2/Validator.php
+++ b/pear/PEAR/PackageFile/v2/Validator.php
@@ -107,7 +107,7 @@ class PEAR_PackageFile_v2_Validator
isset($test['dependencies']['required']) &&
isset($test['dependencies']['required']['pearinstaller']) &&
isset($test['dependencies']['required']['pearinstaller']['min']) &&
- version_compare('@package_version@',
+ version_compare('1.4.9',
$test['dependencies']['required']['pearinstaller']['min'], '<')) {
$this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
return false;
@@ -1284,7 +1284,7 @@ class PEAR_PackageFile_v2_Validator
$this->_stack->push(__FUNCTION__, 'error',
array('version' => $version),
'This package.xml requires PEAR version %version% to parse properly, we are ' .
- 'version @package_version@');
+ 'version 1.4.9');
}
function _invalidTagOrder($oktags, $actual, $root)
@@ -1996,4 +1996,4 @@ class PEAR_PackageFile_v2_Validator
return $providesret;
}
}
-?> \ No newline at end of file
+?>
diff --git a/pear/PEAR/REST.php b/pear/PEAR/REST.php
index 89b783a6d8..cfd5c0f2cc 100644
--- a/pear/PEAR/REST.php
+++ b/pear/PEAR/REST.php
@@ -323,7 +323,7 @@ class PEAR_REST
$ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
}
$request .= "Host: $host:$port\r\n" . $ifmodifiedsince .
- "User-Agent: PEAR/@package_version@/PHP/" . PHP_VERSION . "\r\n";
+ "User-Agent: PEAR/1.4.9/PHP/" . PHP_VERSION . "\r\n";
$username = $this->config->get('username');
$password = $this->config->get('password');
if ($username && $password) {
@@ -394,4 +394,4 @@ class PEAR_REST
return $data;
}
}
-?> \ No newline at end of file
+?>
diff --git a/pear/install-pear.php b/pear/install-pear.php
index 353b87c960..c7928ba7bf 100644
--- a/pear/install-pear.php
+++ b/pear/install-pear.php
@@ -4,7 +4,7 @@
error_reporting(E_ALL);
$pear_dir = dirname(__FILE__);
-ini_set('include_path', '');
+ini_set('include_path', $pear_dir);
if (function_exists('mb_internal_encoding')) {
mb_internal_encoding('ASCII');
}
@@ -126,6 +126,12 @@ $pkg = &new PEAR_PackageFile($config, $debug);
foreach ($install_files as $package => $instfile) {
$info = &$pkg->fromAnyFile($instfile, PEAR_VALIDATE_INSTALLING);
if (PEAR::isError($info)) {
+ if (is_array($info->getUserInfo())) {
+ foreach ($info->getUserInfo() as $err) {
+ $ui->outputData(sprintf("[PEAR] %s: %s", $err['level'],
+ $err['message']));
+ }
+ }
$ui->outputData(sprintf("[PEAR] %s: %s", $package,
$info->getMessage()));
continue;
@@ -134,6 +140,12 @@ foreach ($install_files as $package => $instfile) {
$downloaderpackage = &new PEAR_Downloader_Package($installer);
$err = $downloaderpackage->initialize($instfile);
if (PEAR::isError($err)) {
+ if (is_array($err->getUserInfo())) {
+ foreach ($err->getUserInfo() as $error) {
+ $ui->outputData(sprintf("[PEAR] %s: %s", $error['level'],
+ $error['message']));
+ }
+ }
$ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
continue;
}