summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-03-18 11:28:21 +0100
committerOndřej Surý <ondrej@sury.org>2011-03-18 11:28:21 +0100
commit038ba12e8724d537040e88ec794354b0c063f0a6 (patch)
treea7181b4f4d10e3a154522d4b96fdf42f4597bf2a /pear
parentfd5a0b31640419ca63d1ddeaffd6d3cf2a741814 (diff)
downloadphp-038ba12e8724d537040e88ec794354b0c063f0a6.tar.gz
Imported Upstream version 5.3.6upstream/5.3.6
Diffstat (limited to 'pear')
-rw-r--r--pear/install-pear-nozlib.phar2864
1 files changed, 1752 insertions, 1112 deletions
diff --git a/pear/install-pear-nozlib.phar b/pear/install-pear-nozlib.phar
index 59b7cfe8a..9cf5bb46b 100644
--- a/pear/install-pear-nozlib.phar
+++ b/pear/install-pear-nozlib.phar
@@ -1234,13 +1234,12 @@ if (extension_loaded('phar')) {if (isset($_SERVER) && isset($_SERVER['REQUEST_UR
require_once 'phar://install-pear-nozlib.phar/index.php';
-__HALT_COMPILER();ÿ
-2
-2
-
-
-ŸA˜m
-
+__HALT_COMPILER();-
+m
+
+
+¾m
+
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
@@ -1272,29 +1271,27 @@ __HALT_COMPILER();ÿ
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- *
- * @category File_Formats
- * @package Archive_Tar
- * @author Vincent Blavet <vincent@phpconcept.net>
- * @copyright 1997-2008 The Authors
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Tar.php 295988 2010-03-09 08:39:37Z mrook $
- * @link http://pear.php.net/package/Archive_Tar
+ * @category File_Formats
+ * @package Archive_Tar
+ * @author Vincent Blavet <vincent@phpconcept.net>
+ * @copyright 1997-2010 The Authors
+ * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
+ * @version CVS: $Id: Tar.php 304123 2010-10-05 19:36:38Z mrook $
+ * @link http://pear.php.net/package/Archive_Tar
*/
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-
-define ('ARCHIVE_TAR_ATT_SEPARATOR', 90001);
-define ('ARCHIVE_TAR_END_BLOCK', pack("a512", ''));
+define('ARCHIVE_TAR_ATT_SEPARATOR', 90001);
+define('ARCHIVE_TAR_END_BLOCK', pack("a512", ''));
/**
* Creates a (compressed) Tar archive
*
-* @author Vincent Blavet <vincent@phpconcept.net>
-* @version $Revision: 295988 $
-* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
-* @package Archive_Tar
+* @package Archive_Tar
+* @author Vincent Blavet <vincent@phpconcept.net>
+* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
+* @version $Revision: 304123 $
*/
class Archive_Tar extends PEAR
{
@@ -1333,6 +1330,11 @@ class Archive_Tar extends PEAR
*/
var $_ignore_regexp='';
+ /**
+ * @var object PEAR_Error object
+ */
+ var $error_object=null;
+
// {{{ constructor
/**
* Archive_Tar Class constructor. This flavour of the constructor only
@@ -1341,11 +1343,12 @@ class Archive_Tar extends PEAR
* If the compress argument is set the tar will be read or created as a
* gzip or bz2 compressed TAR file.
*
- * @param string $p_tarname The name of the tar archive to create
- * @param string $p_compress can be null, 'gz' or 'bz2'. This
- * parameter indicates if gzip or bz2 compression
- * is required. For compatibility reason the
- * boolean value 'true' means 'gz'.
+ * @param string $p_tarname The name of the tar archive to create
+ * @param string $p_compress can be null, 'gz' or 'bz2'. This
+ * parameter indicates if gzip or bz2 compression
+ * is required. For compatibility reason the
+ * boolean value 'true' means 'gz'.
+ *
* @access public
*/
function Archive_Tar($p_tarname, $p_compress = null)
@@ -1362,7 +1365,7 @@ class Archive_Tar extends PEAR
if ($data == "\37\213") {
$this->_compress = true;
$this->_compress_type = 'gz';
- // No sure it's enought for a magic code ....
+ // No sure it's enought for a magic code ....
} elseif ($data == "BZ") {
$this->_compress = true;
$this->_compress_type = 'bz2';
@@ -1439,11 +1442,12 @@ class Archive_Tar extends PEAR
* sub-directories are also added.
* See also createModify() method for more details.
*
- * @param array $p_filelist An array of filenames and directory names, or a
- * single string with names separated by a single
- * blank space.
- * @return true on success, false on error.
- * @see createModify()
+ * @param array $p_filelist An array of filenames and directory names, or a
+ * single string with names separated by a single
+ * blank space.
+ *
+ * @return true on success, false on error.
+ * @see createModify()
* @access public
*/
function create($p_filelist)
@@ -1461,11 +1465,12 @@ class Archive_Tar extends PEAR
* even if a file with the same name is already archived.
* See also createModify() method for more details.
*
- * @param array $p_filelist An array of filenames and directory names, or a
- * single string with names separated by a single
- * blank space.
- * @return true on success, false on error.
- * @see createModify()
+ * @param array $p_filelist An array of filenames and directory names, or a
+ * single string with names separated by a single
+ * blank space.
+ *
+ * @return true on success, false on error.
+ * @see createModify()
* @access public
*/
function add($p_filelist)
@@ -1521,16 +1526,17 @@ class Archive_Tar extends PEAR
* for extraction in a different path than the origin files are.
* See also addModify() method for file adding properties.
*
- * @param array $p_filelist An array of filenames and directory names,
- * or a single string with names separated by
- * a single blank space.
- * @param string $p_add_dir A string which contains a path to be added
- * to the memorized path of each element in
- * the list.
- * @param string $p_remove_dir A string which contains a path to be
- * removed from the memorized path of each
- * element in the list, when relevant.
- * @return boolean true on success, false on error.
+ * @param array $p_filelist An array of filenames and directory names,
+ * or a single string with names separated by
+ * a single blank space.
+ * @param string $p_add_dir A string which contains a path to be added
+ * to the memorized path of each element in
+ * the list.
+ * @param string $p_remove_dir A string which contains a path to be
+ * removed from the memorized path of each
+ * element in the list, when relevant.
+ *
+ * @return boolean true on success, false on error.
* @access public
* @see addModify()
*/
@@ -1593,17 +1599,18 @@ class Archive_Tar extends PEAR
* If a file/dir is not readable the file/dir is ignored. However an
* error text is send to PEAR error.
*
- * @param array $p_filelist An array of filenames and directory
- * names, or a single string with names
- * separated by a single blank space.
- * @param string $p_add_dir A string which contains a path to be
- * added to the memorized path of each
- * element in the list.
- * @param string $p_remove_dir A string which contains a path to be
- * removed from the memorized path of
- * each element in the list, when
- * relevant.
- * @return true on success, false on error.
+ * @param array $p_filelist An array of filenames and directory
+ * names, or a single string with names
+ * separated by a single blank space.
+ * @param string $p_add_dir A string which contains a path to be
+ * added to the memorized path of each
+ * element in the list.
+ * @param string $p_remove_dir A string which contains a path to be
+ * removed from the memorized path of
+ * each element in the list, when
+ * relevant.
+ *
+ * @return true on success, false on error.
* @access public
*/
function addModify($p_filelist, $p_add_dir, $p_remove_dir='')
@@ -1612,7 +1619,7 @@ class Archive_Tar extends PEAR
if (!$this->_isArchive())
$v_result = $this->createModify($p_filelist, $p_add_dir,
- $p_remove_dir);
+ $p_remove_dir);
else {
if (is_array($p_filelist))
$v_list = $p_filelist;
@@ -1636,12 +1643,13 @@ class Archive_Tar extends PEAR
* end of the existing archive. If the archive does not yet exists it
* is created.
*
- * @param string $p_filename A string which contains the full
- * filename path that will be associated
- * with the string.
- * @param string $p_string The content of the file added in
- * the archive.
- * @return true on success, false on error.
+ * @param string $p_filename A string which contains the full
+ * filename path that will be associated
+ * with the string.
+ * @param string $p_string The content of the file added in
+ * the archive.
+ *
+ * @return true on success, false on error.
* @access public
*/
function addString($p_filename, $p_string)
@@ -1694,14 +1702,15 @@ class Archive_Tar extends PEAR
* is returned. However the result can be a partial extraction that may
* need to be manually cleaned.
*
- * @param string $p_path The path of the directory where the
- * files/dir need to by extracted.
- * @param string $p_remove_path Part of the memorized path that can be
- * removed if present at the beginning of
- * the file/dir path.
- * @return boolean true on success, false on error.
+ * @param string $p_path The path of the directory where the
+ * files/dir need to by extracted.
+ * @param string $p_remove_path Part of the memorized path that can be
+ * removed if present at the beginning of
+ * the file/dir path.
+ *
+ * @return boolean true on success, false on error.
* @access public
- * @see extractList()
+ * @see extractList()
*/
function extractModify($p_path, $p_remove_path)
{
@@ -1722,8 +1731,10 @@ class Archive_Tar extends PEAR
/**
* This method extract from the archive one file identified by $p_filename.
* The return value is a string with the file content, or NULL on error.
- * @param string $p_filename The path of the file to extract in a string.
- * @return a string with the file content or NULL.
+ *
+ * @param string $p_filename The path of the file to extract in a string.
+ *
+ * @return a string with the file content or NULL.
* @access public
*/
function extractInString($p_filename)
@@ -1732,7 +1743,7 @@ class Archive_Tar extends PEAR
$v_result = $this->_extractInString($p_filename);
$this->_close();
} else {
- $v_result = NULL;
+ $v_result = null;
}
return $v_result;
@@ -1746,17 +1757,19 @@ class Archive_Tar extends PEAR
* in the directory indicated by the optional $p_path parameter.
* If indicated the $p_remove_path can be used in the same way as it is
* used in extractModify() method.
- * @param array $p_filelist An array of filenames and directory names,
- * or a single string with names separated
- * by a single blank space.
- * @param string $p_path The path of the directory where the
- * files/dir need to by extracted.
- * @param string $p_remove_path Part of the memorized path that can be
- * removed if present at the beginning of
- * the file/dir path.
- * @return true on success, false on error.
+ *
+ * @param array $p_filelist An array of filenames and directory names,
+ * or a single string with names separated
+ * by a single blank space.
+ * @param string $p_path The path of the directory where the
+ * files/dir need to by extracted.
+ * @param string $p_remove_path Part of the memorized path that can be
+ * removed if present at the beginning of
+ * the file/dir path.
+ *
+ * @return true on success, false on error.
* @access public
- * @see extractModify()
+ * @see extractModify()
*/
function extractList($p_filelist, $p_path='', $p_remove_path='')
{
@@ -1787,8 +1800,10 @@ class Archive_Tar extends PEAR
* This method set specific attributes of the archive. It uses a variable
* list of parameters, in the format attribute code + attribute values :
* $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ',');
- * @param mixed $argv variable list of attributes and values
- * @return true on success, false on error.
+ *
+ * @param mixed $argv variable list of attributes and values
+ *
+ * @return true on success, false on error.
* @access public
*/
function setAttribute()
@@ -1841,7 +1856,9 @@ class Archive_Tar extends PEAR
* This method sets the regular expression for ignoring files and directories
* at import, for example:
* $arch->setIgnoreRegexp("#CVS|\.svn#");
- * @param string $regexp regular expression defining which files or directories to ignore
+ *
+ * @param string $regexp regular expression defining which files or directories to ignore
+ *
* @access public
*/
function setIgnoreRegexp($regexp)
@@ -1855,7 +1872,9 @@ class Archive_Tar extends PEAR
* This method sets the regular expression for ignoring all files and directories
* matching the filenames in the array list at import, for example:
* $arch->setIgnoreList(array('CVS', '.svn', 'bin/tool'));
- * @param array $list a list of file or directory names to ignore
+ *
+ * @param array $list a list of file or directory names to ignore
+ *
* @access public
*/
function setIgnoreList($list)
@@ -1869,23 +1888,21 @@ class Archive_Tar extends PEAR
// {{{ _error()
function _error($p_message)
{
- // ----- To be completed
- $this->raiseError($p_message);
+ $this->error_object = &$this->raiseError($p_message);
}
// }}}
// {{{ _warning()
function _warning($p_message)
{
- // ----- To be completed
- $this->raiseError($p_message);
+ $this->error_object = &$this->raiseError($p_message);
}
// }}}
// {{{ _isArchive()
- function _isArchive($p_filename=NULL)
+ function _isArchive($p_filename=null)
{
- if ($p_filename == NULL) {
+ if ($p_filename == null) {
$p_filename = $this->_tarname;
}
clearstatcache();
@@ -2620,6 +2637,7 @@ class Archive_Tar extends PEAR
* Detect and report a malicious file name
*
* @param string $file
+ *
* @return bool
* @access private
*/
@@ -2670,9 +2688,11 @@ class Archive_Tar extends PEAR
// {{{ _extractInString()
/**
* This method extract from the archive one file identified by $p_filename.
- * The return value is a string with the file content, or NULL on error.
- * @param string $p_filename The path of the file to extract in a string.
- * @return a string with the file content or NULL.
+ * The return value is a string with the file content, or null on error.
+ *
+ * @param string $p_filename The path of the file to extract in a string.
+ *
+ * @return a string with the file content or null.
* @access private
*/
function _extractInString($p_filename)
@@ -2682,7 +2702,7 @@ class Archive_Tar extends PEAR
While (strlen($v_binary_data = $this->_readBlock()) != 0)
{
if (!$this->_readHeader($v_binary_data, $v_header))
- return NULL;
+ return null;
if ($v_header['filename'] == '')
continue;
@@ -2690,14 +2710,14 @@ class Archive_Tar extends PEAR
// ----- Look for long filename
if ($v_header['typeflag'] == 'L') {
if (!$this->_readLongHeader($v_header))
- return NULL;
+ return null;
}
if ($v_header['filename'] == $p_filename) {
if ($v_header['typeflag'] == "5") {
$this->_error('Unable to extract in string a directory '
.'entry {'.$v_header['filename'].'}');
- return NULL;
+ return null;
} else {
$n = floor($v_header['size']/512);
for ($i=0; $i<$n; $i++) {
@@ -2715,7 +2735,7 @@ class Archive_Tar extends PEAR
}
}
- return NULL;
+ return null;
}
// }}}
@@ -2742,16 +2762,16 @@ class Archive_Tar extends PEAR
switch ($p_mode) {
case "complete" :
- $v_extract_all = TRUE;
- $v_listing = FALSE;
+ $v_extract_all = true;
+ $v_listing = false;
break;
case "partial" :
- $v_extract_all = FALSE;
- $v_listing = FALSE;
+ $v_extract_all = false;
+ $v_listing = false;
break;
case "list" :
- $v_extract_all = FALSE;
- $v_listing = TRUE;
+ $v_extract_all = false;
+ $v_listing = true;
break;
default :
$this->_error('Invalid extract mode ('.$p_mode.')');
@@ -2789,19 +2809,19 @@ class Archive_Tar extends PEAR
if ((strlen($v_header['filename']) > strlen($p_file_list[$i]))
&& (substr($v_header['filename'], 0, strlen($p_file_list[$i]))
== $p_file_list[$i])) {
- $v_extract_file = TRUE;
+ $v_extract_file = true;
break;
}
}
// ----- It is a file, so compare the file names
elseif ($p_file_list[$i] == $v_header['filename']) {
- $v_extract_file = TRUE;
+ $v_extract_file = true;
break;
}
}
} else {
- $v_extract_file = TRUE;
+ $v_extract_file = true;
}
// ----- Look if this file need to be extracted
@@ -2900,12 +2920,19 @@ class Archive_Tar extends PEAR
// ----- Check the file size
clearstatcache();
- if (filesize($v_header['filename']) != $v_header['size']) {
+ if (!is_file($v_header['filename'])) {
$this->_error('Extracted file '.$v_header['filename']
- .' does not have the correct file size \''
- .filesize($v_header['filename'])
- .'\' ('.$v_header['size']
- .' expected). Archive may be corrupted.');
+ .'does not exist. Archive may be corrupted.');
+ return false;
+ }
+
+ $filesize = filesize($v_header['filename']);
+ if ($filesize != $v_header['size']) {
+ $this->_error('Extracted file '.$v_header['filename']
+ .' does not have the correct file size \''
+ .$filesize
+ .'\' ('.$v_header['size']
+ .' expected). Archive may be corrupted.');
return false;
}
}
@@ -3054,7 +3081,7 @@ class Archive_Tar extends PEAR
*
* @param string $p_dir directory to check
*
- * @return bool TRUE if the directory exists or was created
+ * @return bool true if the directory exists or was created
*/
function _dirCheck($p_dir)
{
@@ -5840,25 +5867,23 @@ How it works :
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
- * Color.php
+ * PHP Version 5
*
- * PHP Version 5
- *
* Copyright (c) 1997-2004 The PHP Group
*
- * This source file is subject to version 3.0 of the PHP license,
- * that is bundled with this package in the file LICENSE, and is
- * available through the world-wide-web at the following url:
- * http://www.php.net/license/3_0.txt.
- * If you did not receive a copy of the PHP license and are unable to
- * obtain it through the world-wide-web, please send a note to
- * license@php.net so we can mail you a copy immediately.
+ * This source file is subject to version 3.0 of the PHP license,
+ * that is bundled with this package in the file LICENSE, and is
+ * available through the world-wide-web at the following url:
+ * http://www.php.net/license/3_0.txt.
+ * If you did not receive a copy of the PHP license and are unable to
+ * obtain it through the world-wide-web, please send a note to
+ * license@php.net so we can mail you a copy immediately.
*
* @category Console
* @package Console_Getopt
* @author Andrei Zmievski <andrei@php.net>
* @license http://www.php.net/license/3_0.txt PHP 3.0
- * @version CVS: $Id: Getopt.php 267328 2008-10-14 18:53:25Z andrei $
+ * @version CVS: $Id: Getopt.php 306067 2010-12-08 00:13:31Z dufuz $
* @link http://pear.php.net/package/Console_Getopt
*/
@@ -5905,14 +5930,15 @@ class Console_Getopt
* @param array $args an array of command-line arguments
* @param string $short_options specifies the list of allowed short options
* @param array $long_options specifies the list of allowed long options
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
* @return array two-element array containing the list of parsed options and
* the non-option arguments
* @access public
*/
- function getopt2($args, $short_options, $long_options = null)
+ function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
{
- return Console_Getopt::doGetopt(2, $args, $short_options, $long_options);
+ return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
}
/**
@@ -5926,10 +5952,10 @@ class Console_Getopt
* @see getopt2()
* @return array two-element array containing the list of parsed options and
* the non-option arguments
- */
- function getopt($args, $short_options, $long_options = null)
+ */
+ function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
{
- return Console_Getopt::doGetopt(1, $args, $short_options, $long_options);
+ return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
}
/**
@@ -5939,20 +5965,22 @@ class Console_Getopt
* @param array $args an array of command-line arguments
* @param string $short_options specifies the list of allowed short options
* @param array $long_options specifies the list of allowed long options
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
* @return array
*/
- function doGetopt($version, $args, $short_options, $long_options = null)
+ function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
{
// in case you pass directly readPHPArgv() as the first arg
if (PEAR::isError($args)) {
return $args;
}
+
if (empty($args)) {
return array(array(), array());
}
- $opts = array();
- $non_opts = array();
+
+ $non_opts = $opts = array();
settype($args, 'array');
@@ -5972,7 +6000,6 @@ class Console_Getopt
reset($args);
while (list($i, $arg) = each($args)) {
-
/* The special element '--' means explicit end of
options. Treat the rest of the arguments as non-options
and end the loop. */
@@ -5981,14 +6008,15 @@ class Console_Getopt
break;
}
- if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-'
- && !$long_options)) {
+ if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) {
$non_opts = array_merge($non_opts, array_slice($args, $i));
break;
} elseif (strlen($arg) > 1 && $arg{1} == '-') {
- $error = Console_Getopt::_parseLongOption(substr($arg, 2),
- $long_options, $opts,
- $args);
+ $error = Console_Getopt::_parseLongOption(substr($arg, 2),
+ $long_options,
+ $opts,
+ $args,
+ $skip_unknown);
if (PEAR::isError($error)) {
return $error;
}
@@ -5998,8 +6026,10 @@ class Console_Getopt
break;
} else {
$error = Console_Getopt::_parseShortOption(substr($arg, 1),
- $short_options, $opts,
- $args);
+ $short_options,
+ $opts,
+ $args,
+ $skip_unknown);
if (PEAR::isError($error)) {
return $error;
}
@@ -6016,19 +6046,23 @@ class Console_Getopt
* @param string[] $short_options Available short options
* @param string[][] &$opts
* @param string[] &$args
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
* @access private
* @return void
*/
- function _parseShortOption($arg, $short_options, &$opts, &$args)
+ function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
{
for ($i = 0; $i < strlen($arg); $i++) {
$opt = $arg{$i};
$opt_arg = null;
/* Try to find the short option in the specifier string. */
- if (($spec = strstr($short_options, $opt)) === false
- || $arg{$i} == ':') {
+ if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') {
+ if ($skip_unknown === true) {
+ break;
+ }
+
$msg = "Console_Getopt: unrecognized option -- $opt";
return PEAR::raiseError($msg);
}
@@ -6049,7 +6083,7 @@ class Console_Getopt
break;
} else if (list(, $opt_arg) = each($args)) {
/* Else use the next argument. */;
- if (Console_Getopt::_isShortOpt($opt_arg)
+ if (Console_Getopt::_isShortOpt($opt_arg)
|| Console_Getopt::_isLongOpt($opt_arg)) {
$msg = "option requires an argument --$opt";
return PEAR::raiseError("Console_Getopt:" . $msg);
@@ -6075,7 +6109,7 @@ class Console_Getopt
*/
function _isShortOpt($arg)
{
- return strlen($arg) == 2 && $arg[0] == '-'
+ return strlen($arg) == 2 && $arg[0] == '-'
&& preg_match('/[a-zA-Z]/', $arg[1]);
}
@@ -6104,7 +6138,7 @@ class Console_Getopt
* @access private
* @return void|PEAR_Error
*/
- function _parseLongOption($arg, $long_options, &$opts, &$args)
+ function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
{
@list($opt, $opt_arg) = explode('=', $arg, 2);
@@ -6150,7 +6184,7 @@ class Console_Getopt
return PEAR::raiseError($msg);
}
- if (Console_Getopt::_isShortOpt($opt_arg)
+ if (Console_Getopt::_isShortOpt($opt_arg)
|| Console_Getopt::_isLongOpt($opt_arg)) {
$msg = "Console_Getopt: option requires an argument --$opt";
return PEAR::raiseError($msg);
@@ -6165,6 +6199,10 @@ class Console_Getopt
return;
}
+ if ($skip_unknown === true) {
+ return;
+ }
+
return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
}
@@ -6191,11 +6229,8 @@ class Console_Getopt
return $argv;
}
-}
-
-?>
-package.xml
-<package packagerversion="1.6.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+}package.xml
+<package packagerversion="1.9.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Console_Getopt</name>
<channel>pear.php.net</channel>
<summary>Command-line option parser</summary>
@@ -6219,28 +6254,30 @@ short and long options.</description>
<email>cellog@php.net</email>
<active>yes</active>
</helper>
- <date>2007-06-12</date>
- <time>14:52:39</time>
+ <date>2010-12-11</date>
+ <time>20:20:13</time>
<version>
- <release>1.2.3</release>
- <api>1.2.1</api>
+ <release>1.3.0</release>
+ <api>1.3.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>* fix Bug #11068: No way to read plain &quot;-&quot; option [cardoe]</notes>
+ <notes>
+* Implement Request #13140: [PATCH] to skip unknown parameters. [patch by rquadling, improved on by dufuz]
+ </notes>
<contents>
<dir name="/">
- <file md5sum="f2175a45c5e5bc7c97e174bdae55b671" name="Console/Getopt.php" role="php" />
+ <file md5sum="ed666da6b1c5d01c3ecbf1f588a70a60" name="Console/Getopt.php" role="php" />
</dir>
</contents>
<compatible>
<name>PEAR</name>
<channel>pear.php.net</channel>
<min>1.4.0</min>
- <max>1.6.0</max>
+ <max>1.10.0</max>
</compatible>
<dependencies>
<required>
@@ -6248,13 +6285,28 @@ short and long options.</description>
<min>4.3.0</min>
</php>
<pearinstaller>
- <min>1.4.3</min>
+ <min>1.9.1</min>
</pearinstaller>
</required>
</dependencies>
<phprelease />
<changelog>
<release>
+ <date>2007-06-12</date>
+ <version>
+ <release>1.2.3</release>
+ <api>1.2.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+* fix Bug #11068: No way to read plain &quot;-&quot; option [cardoe]
+ </notes>
+ </release>
+ <release>
<version>
<release>1.2.2</release>
<api>1.2.1</api>
@@ -6265,8 +6317,10 @@ short and long options.</description>
</stability>
<date>2007-02-17</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>* fix Bug #4475: An ambiguous error occurred when specifying similar longoption name.
-* fix Bug #10055: Not failing properly on short options missing required values</notes>
+ <notes>
+* fix Bug #4475: An ambiguous error occurred when specifying similar longoption name.
+* fix Bug #10055: Not failing properly on short options missing required values
+ </notes>
</release>
<release>
<version>
@@ -6279,7 +6333,9 @@ short and long options.</description>
</stability>
<date>2006-12-08</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>Fixed bugs #4448 (Long parameter values truncated with longoption parameter) and #7444 (Trailing spaces after php closing tag)</notes>
+ <notes>
+Fixed bugs #4448 (Long parameter values truncated with longoption parameter) and #7444 (Trailing spaces after php closing tag)
+ </notes>
</release>
<release>
<version>
@@ -6292,7 +6348,9 @@ short and long options.</description>
</stability>
<date>2003-12-11</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>Fix to preserve BC with 1.0 and allow correct behaviour for new users</notes>
+ <notes>
+Fix to preserve BC with 1.0 and allow correct behaviour for new users
+ </notes>
</release>
<release>
<version>
@@ -6305,7 +6363,9 @@ short and long options.</description>
</stability>
<date>2002-09-13</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>Stable release</notes>
+ <notes>
+Stable release
+ </notes>
</release>
<release>
<version>
@@ -6318,8 +6378,10 @@ short and long options.</description>
</stability>
<date>2002-05-26</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>POSIX getopt compatibility fix: treat first element of args
- array as command name</notes>
+ <notes>
+POSIX getopt compatibility fix: treat first element of args
+ array as command name
+ </notes>
</release>
<release>
<version>
@@ -6332,7 +6394,9 @@ short and long options.</description>
</stability>
<date>2002-05-12</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>Packaging fix</notes>
+ <notes>
+Packaging fix
+ </notes>
</release>
<release>
<version>
@@ -6345,39 +6409,49 @@ short and long options.</description>
</stability>
<date>2002-05-12</date>
<license uri="http://www.php.net/license">PHP License</license>
- <notes>Initial release</notes>
+ <notes>
+Initial release
+ </notes>
</release>
</changelog>
</package>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 5 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available through the world-wide-web at the following url: |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Author: Andrei Zmievski <andrei@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: Getopt.php,v 1.4 2007/06/12 14:58:56 cellog Exp $
+/**
+ * PHP Version 5
+ *
+ * Copyright (c) 1997-2004 The PHP Group
+ *
+ * This source file is subject to version 3.0 of the PHP license,
+ * that is bundled with this package in the file LICENSE, and is
+ * available through the world-wide-web at the following url:
+ * http://www.php.net/license/3_0.txt.
+ * If you did not receive a copy of the PHP license and are unable to
+ * obtain it through the world-wide-web, please send a note to
+ * license@php.net so we can mail you a copy immediately.
+ *
+ * @category Console
+ * @package Console_Getopt
+ * @author Andrei Zmievski <andrei@php.net>
+ * @license http://www.php.net/license/3_0.txt PHP 3.0
+ * @version CVS: $Id: Getopt.php 306067 2010-12-08 00:13:31Z dufuz $
+ * @link http://pear.php.net/package/Console_Getopt
+ */
require_once 'PEAR.php';
/**
* Command-line options parsing class.
*
- * @author Andrei Zmievski <andrei@php.net>
- *
+ * @category Console
+ * @package Console_Getopt
+ * @author Andrei Zmievski <andrei@php.net>
+ * @license http://www.php.net/license/3_0.txt PHP 3.0
+ * @link http://pear.php.net/package/Console_Getopt
*/
-class Console_Getopt {
+class Console_Getopt
+{
+
/**
* Parses the command-line options.
*
@@ -6404,45 +6478,60 @@ class Console_Getopt {
*
* Most of the semantics of this function are based on GNU getopt_long().
*
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
+ * @param array $args an array of command-line arguments
+ * @param string $short_options specifies the list of allowed short options
+ * @param array $long_options specifies the list of allowed long options
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
* @return array two-element array containing the list of parsed options and
* the non-option arguments
- *
* @access public
- *
*/
- function getopt2($args, $short_options, $long_options = null)
+ function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
{
- return Console_Getopt::doGetopt(2, $args, $short_options, $long_options);
+ return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
}
/**
* This function expects $args to start with the script name (POSIX-style).
* Preserved for backwards compatibility.
+ *
+ * @param array $args an array of command-line arguments
+ * @param string $short_options specifies the list of allowed short options
+ * @param array $long_options specifies the list of allowed long options
+ *
* @see getopt2()
- */
- function getopt($args, $short_options, $long_options = null)
+ * @return array two-element array containing the list of parsed options and
+ * the non-option arguments
+ */
+ function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
{
- return Console_Getopt::doGetopt(1, $args, $short_options, $long_options);
+ return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
}
/**
* The actual implementation of the argument parsing code.
+ *
+ * @param int $version Version to use
+ * @param array $args an array of command-line arguments
+ * @param string $short_options specifies the list of allowed short options
+ * @param array $long_options specifies the list of allowed long options
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
+ *
+ * @return array
*/
- function doGetopt($version, $args, $short_options, $long_options = null)
+ function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
{
// in case you pass directly readPHPArgv() as the first arg
if (PEAR::isError($args)) {
return $args;
}
+
if (empty($args)) {
return array(array(), array());
}
- $opts = array();
- $non_opts = array();
+
+ $non_opts = $opts = array();
settype($args, 'array');
@@ -6462,7 +6551,6 @@ class Console_Getopt {
reset($args);
while (list($i, $arg) = each($args)) {
-
/* The special element '--' means explicit end of
options. Treat the rest of the arguments as non-options
and end the loop. */
@@ -6475,17 +6563,27 @@ class Console_Getopt {
$non_opts = array_merge($non_opts, array_slice($args, $i));
break;
} elseif (strlen($arg) > 1 && $arg{1} == '-') {
- $error = Console_Getopt::_parseLongOption(substr($arg, 2), $long_options, $opts, $args);
- if (PEAR::isError($error))
+ $error = Console_Getopt::_parseLongOption(substr($arg, 2),
+ $long_options,
+ $opts,
+ $args,
+ $skip_unknown);
+ if (PEAR::isError($error)) {
return $error;
+ }
} elseif ($arg == '-') {
// - is stdin
$non_opts = array_merge($non_opts, array_slice($args, $i));
break;
} else {
- $error = Console_Getopt::_parseShortOption(substr($arg, 1), $short_options, $opts, $args);
- if (PEAR::isError($error))
+ $error = Console_Getopt::_parseShortOption(substr($arg, 1),
+ $short_options,
+ $opts,
+ $args,
+ $skip_unknown);
+ if (PEAR::isError($error)) {
return $error;
+ }
}
}
@@ -6493,19 +6591,31 @@ class Console_Getopt {
}
/**
- * @access private
+ * Parse short option
*
+ * @param string $arg Argument
+ * @param string[] $short_options Available short options
+ * @param string[][] &$opts
+ * @param string[] &$args
+ * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
+ *
+ * @access private
+ * @return void
*/
- function _parseShortOption($arg, $short_options, &$opts, &$args)
+ function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
{
for ($i = 0; $i < strlen($arg); $i++) {
- $opt = $arg{$i};
+ $opt = $arg{$i};
$opt_arg = null;
/* Try to find the short option in the specifier string. */
- if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':')
- {
- return PEAR::raiseError("Console_Getopt: unrecognized option -- $opt");
+ if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') {
+ if ($skip_unknown === true) {
+ break;
+ }
+
+ $msg = "Console_Getopt: unrecognized option -- $opt";
+ return PEAR::raiseError($msg);
}
if (strlen($spec) > 1 && $spec{1} == ':') {
@@ -6524,11 +6634,14 @@ class Console_Getopt {
break;
} else if (list(, $opt_arg) = each($args)) {
/* Else use the next argument. */;
- if (Console_Getopt::_isShortOpt($opt_arg) || Console_Getopt::_isLongOpt($opt_arg)) {
- return PEAR::raiseError("Console_Getopt: option requires an argument -- $opt");
+ if (Console_Getopt::_isShortOpt($opt_arg)
+ || Console_Getopt::_isLongOpt($opt_arg)) {
+ $msg = "option requires an argument --$opt";
+ return PEAR::raiseError("Console_Getopt:" . $msg);
}
} else {
- return PEAR::raiseError("Console_Getopt: option requires an argument -- $opt");
+ $msg = "option requires an argument --$opt";
+ return PEAR::raiseError("Console_Getopt:" . $msg);
}
}
}
@@ -6538,36 +6651,54 @@ class Console_Getopt {
}
/**
- * @access private
+ * Checks if an argument is a short option
*
+ * @param string $arg Argument to check
+ *
+ * @access private
+ * @return bool
*/
function _isShortOpt($arg)
{
- return strlen($arg) == 2 && $arg[0] == '-' && preg_match('/[a-zA-Z]/', $arg[1]);
+ return strlen($arg) == 2 && $arg[0] == '-'
+ && preg_match('/[a-zA-Z]/', $arg[1]);
}
/**
- * @access private
+ * Checks if an argument is a long option
*
+ * @param string $arg Argument to check
+ *
+ * @access private
+ * @return bool
*/
function _isLongOpt($arg)
{
return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
- preg_match('/[a-zA-Z]+$/', substr($arg, 2));
+ preg_match('/[a-zA-Z]+$/', substr($arg, 2));
}
/**
- * @access private
+ * Parse long option
*
+ * @param string $arg Argument
+ * @param string[] $long_options Available long options
+ * @param string[][] &$opts
+ * @param string[] &$args
+ *
+ * @access private
+ * @return void|PEAR_Error
*/
- function _parseLongOption($arg, $long_options, &$opts, &$args)
+ function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
{
@list($opt, $opt_arg) = explode('=', $arg, 2);
+
$opt_len = strlen($opt);
for ($i = 0; $i < count($long_options); $i++) {
$long_opt = $long_options[$i];
$opt_start = substr($long_opt, 0, $opt_len);
+
$long_opt_name = str_replace('=', '', $long_opt);
/* Option doesn't match. Go on to the next one. */
@@ -6575,7 +6706,7 @@ class Console_Getopt {
continue;
}
- $opt_rest = substr($long_opt, $opt_len);
+ $opt_rest = substr($long_opt, $opt_len);
/* Check that the options uniquely matches one of the allowed
options. */
@@ -6584,12 +6715,15 @@ class Console_Getopt {
} else {
$next_option_rest = '';
}
+
if ($opt_rest != '' && $opt{0} != '=' &&
$i + 1 < count($long_options) &&
$opt == substr($long_options[$i+1], 0, $opt_len) &&
$next_option_rest != '' &&
$next_option_rest{0} != '=') {
- return PEAR::raiseError("Console_Getopt: option --$opt is ambiguous");
+
+ $msg = "Console_Getopt: option --$opt is ambiguous";
+ return PEAR::raiseError($msg);
}
if (substr($long_opt, -1) == '=') {
@@ -6597,37 +6731,47 @@ class Console_Getopt {
/* Long option requires an argument.
Take the next argument if one wasn't specified. */;
if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) {
- return PEAR::raiseError("Console_Getopt: option --$opt requires an argument");
+ $msg = "Console_Getopt: option requires an argument --$opt";
+ return PEAR::raiseError($msg);
}
- if (Console_Getopt::_isShortOpt($opt_arg) || Console_Getopt::_isLongOpt($opt_arg)) {
- return PEAR::raiseError("Console_Getopt: option requires an argument --$opt");
+
+ if (Console_Getopt::_isShortOpt($opt_arg)
+ || Console_Getopt::_isLongOpt($opt_arg)) {
+ $msg = "Console_Getopt: option requires an argument --$opt";
+ return PEAR::raiseError($msg);
}
}
} else if ($opt_arg) {
- return PEAR::raiseError("Console_Getopt: option --$opt doesn't allow an argument");
+ $msg = "Console_Getopt: option --$opt doesn't allow an argument";
+ return PEAR::raiseError($msg);
}
$opts[] = array('--' . $opt, $opt_arg);
return;
}
+ if ($skip_unknown === true) {
+ return;
+ }
+
return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
}
/**
- * Safely read the $argv PHP array across different PHP configurations.
- * Will take care on register_globals and register_argc_argv ini directives
- *
- * @access public
- * @return mixed the $argv PHP array or PEAR error if not registered
- */
+ * Safely read the $argv PHP array across different PHP configurations.
+ * Will take care on register_globals and register_argc_argv ini directives
+ *
+ * @access public
+ * @return mixed the $argv PHP array or PEAR error if not registered
+ */
function readPHPArgv()
{
global $argv;
if (!is_array($argv)) {
if (!@is_array($_SERVER['argv'])) {
if (!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) {
- return PEAR::raiseError("Console_Getopt: Could not read cmd args (register_argc_argv=Off?)");
+ $msg = "Could not read cmd args (register_argc_argv=Off?)";
+ return PEAR::raiseError("Console_Getopt: " . $msg);
}
return $GLOBALS['HTTP_SERVER_VARS']['argv'];
}
@@ -6636,12 +6780,9 @@ class Console_Getopt {
return $argv;
}
-}
-
-?>
-
-
-/* $Id: install-pear.php 287906 2009-08-30 20:43:17Z dufuz $ */
+}
+while (@ob_end_flush());
+/* $Id: install-pear.php 308763 2011-02-28 16:18:46Z dufuz $ */
error_reporting(1803);
@@ -6676,10 +6817,10 @@ if (!$a) {
$force = false;
$install_files = array('Archive_Tar' => 'phar://install-pear-nozlib.phar/Archive_Tar-1.3.7.tar',
-'Console_Getopt' => 'phar://install-pear-nozlib.phar/Console_Getopt-1.2.3.tar',
-'Structures_Graph' => 'phar://install-pear-nozlib.phar/Structures_Graph-1.0.3.tar',
+'Console_Getopt' => 'phar://install-pear-nozlib.phar/Console_Getopt-1.3.0.tar',
+'Structures_Graph' => 'phar://install-pear-nozlib.phar/Structures_Graph-1.0.4.tar',
'XML_Util' => 'phar://install-pear-nozlib.phar/XML_Util-1.2.1.tar',
-'PEAR' => 'phar://install-pear-nozlib.phar/PEAR-1.9.1.tar',
+'PEAR' => 'phar://install-pear-nozlib.phar/PEAR-1.9.2.tar',
);
array_shift($argv);
$debug = false;
@@ -7029,7 +7170,7 @@ foreach ($install_files as $package => $instfile) {
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -7277,8 +7418,8 @@ class OS_Guess
* indent-tabs-mode: nil
* c-basic-offset: 4
* End:
- */package2.xml
-<package packagerversion="1.9.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+ */package2.xml
+<package packagerversion="1.9.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>PEAR</name>
<channel>pear.php.net</channel>
<summary>PEAR Base System</summary>
@@ -7360,11 +7501,11 @@ class OS_Guess
<email>mj@php.net</email>
<active>no</active>
</helper>
- <date>2010-05-26</date>
- <time>20:52:38</time>
+ <date>2011-02-28</date>
+ <time>17:48:43</time>
<version>
- <release>1.9.1</release>
- <api>1.9.1</api>
+ <release>1.9.2</release>
+ <api>1.9.2</api>
</version>
<stability>
<release>stable</release>
@@ -7372,245 +7513,252 @@ class OS_Guess
</stability>
<license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
-* svntag improvements, tag package files passed into the command and better directory checks [dufuz]
-* rely on Structures_Graph minimum version instead of recommended version [saltybeagle]
-* Fix Bug #12613: running go-pear.phar from C:\ fails [dufuz]
-* Fix Bug #14841: Installing pear into directory with space fails [dufuz]
-* Fix Bug #16644: pear.bat returns syntax error when parenthesis are in install path. [dufuz] [patch by bwaters (Bryan Waters)]
-* Fix Bug #16767: Use of Depreciated HTML Attributes in the Exception class [dufuz] [patch by fuhrysteve (Stephen J. Fuhry)]
-* Fix Bug #16864: &quot;pear list-upgrades -i&quot; issues E_WARNINGS [dufuz] [patch by rquadling (Richard Quadling)]
-* Fix Bug #17220: command `pear help` outputs to stderr instead of stdout [dufuz]
-* Fix Bug #17234: channel-discover adds port to HTTP Host header [dufuz]
-* Fix Bug #17292: Code Coverage in PEAR_RunTest does not work with namespaces [sebastian]
-* Fix Bug #17359: loadExtension() fails over missing dl() when used in multithread env [dufuz]
-* Fix Bug #17378: pear info $package fails if directory with that name exists [dufuz]
+Important! This is a security fix release. The advisory can be found at
+http://pear.php.net/advisory-20110228.txt
+
+ Bugs:
+ * Fixed Bug #17463: Regression: On Windows, svntag [patch by doconnor]
+ * Fixed Bug #17641: pecl-list doesn&apos;t sort packages by name [dufuz]
+ * Fixed Bug #17781: invalid argument warning on foreach due to an empty optional dependencie [dufuz]
+ * Fixed Bug #17801: PEAR run-tests wrongly detects php-cgi [patch by David Jean Louis (izi)]
+ * Fixed Bug #17839: pear svntag does not tag package.xml file [dufuz]
+ * Fixed Bug #17986: PEAR Installer cannot handle files moved between packages [dufuz]
+ * Fixed Bug #17997: Strange output if directories are not writeable [dufuz]
+ * Fixed Bug #18001: PEAR/RunTest coverage fails [dufuz]
+ * Fixed Bug #18056 [SECURITY]: Symlink attack in PEAR install [dufuz]
+ * Fixed Bug #18218: &quot;pear package&quot; does not allow the use of late static binding [dufuz and Christer Edvartsen]
+ * Fixed Bug #18238: Wrong return code from &quot;pear help&quot; [till]
+ * Fixed Bug #18308: Broken error message about missing channel validator [yunosh]
+
+ This feature is implemented as a result of #18056
+ * Implemented Request #16648: Use TMPDIR for builds instead of /var/tmp [dufuz]
</notes>
<contents>
<dir name="/">
- <file md5sum="3d9c9883c2a7c0747155dada2f26be37" name="OS/Guess.php" role="php">
+ <file md5sum="7603f6baacaf0ea7790fffcc0e16c89a" name="OS/Guess.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="c530153bde718e2028c5ee0edcde919f" name="PEAR/ChannelFile/Parser.php" role="php">
+ <file md5sum="76885f7afe06fad8dc344a117ecd9280" name="PEAR/ChannelFile/Parser.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="8fd87e64002e11fd86eb2f3fbfee6599" name="PEAR/Command/Auth.xml" role="php" />
- <file md5sum="2d274a61760df9acf36f88d2cdcbc5bf" name="PEAR/Command/Auth.php" role="php">
+ <file md5sum="0976ac790aeae7a2e3e39464b29e9157" name="PEAR/Command/Auth.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="73602fd7f051eaf8d37452d0e3063bdb" name="PEAR/Command/Build.xml" role="php" />
- <file md5sum="1e823a289a01f5c817ac4eff1296c50d" name="PEAR/Command/Build.php" role="php">
+ <file md5sum="38647de7fc3d70ba3b712b2b3377129f" name="PEAR/Command/Build.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="6d5aab4d4308c3005b5f584c7783a031" name="PEAR/Command/Channels.xml" role="php" />
- <file md5sum="4a4e8ca23b0faa4f84c140e6b5258d33" name="PEAR/Command/Channels.php" role="php">
+ <file md5sum="5f86073cf92d5ab9be43d2e2469ac3d1" name="PEAR/Command/Channels.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="4ce219083b34cde9e2a5141488f39335" name="PEAR/Command/Common.php" role="php">
+ <file md5sum="b66396998254782d3aa9b6dcb8d52f8c" name="PEAR/Command/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="91f189cb9423b5e87ee0abc5ea1a2be3" name="PEAR/Command/Config.xml" role="php" />
- <file md5sum="47bc731edd8c51466d075789cd8135f3" name="PEAR/Command/Config.php" role="php">
+ <file md5sum="148a76d6d70be44cac0624b710b199d6" name="PEAR/Command/Config.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="2db0386b865d3f9a29f9126728722ece" name="PEAR/Command/Install.xml" role="php" />
- <file md5sum="a4507a5aa3ee2b63a89e8aec734ed634" name="PEAR/Command/Install.php" role="php">
+ <file md5sum="0a59e20243b49602d22de57505760ba2" name="PEAR/Command/Install.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="5cb62a04c0a268f4edd64a49a3895c92" name="PEAR/Command/Mirror.xml" role="php" />
- <file md5sum="9019af267ac15bce27aa81f1839f9bc6" name="PEAR/Command/Mirror.php" role="php">
+ <file md5sum="136994a2164d4ac1cd284720ea341ed8" name="PEAR/Command/Mirror.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="6c3061a594644e49b0648798dce6de32" name="PEAR/Command/Package.xml" role="php" />
- <file md5sum="942478fbb01914eec4e86e8f8f6b5f81" name="PEAR/Command/Package.php" role="php">
+ <file md5sum="13c9637cce82bb8660c4d8b450af46f2" name="PEAR/Command/Package.php" role="php">
<tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" />
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="28dc842ea725d8787b9f9c3dbca5aa22" name="PEAR/Command/Pickle.xml" role="php" />
- <file md5sum="a9cdb1e95f4811b94b65c8150c009351" name="PEAR/Command/Pickle.php" role="php">
+ <file md5sum="bd80b3abdfae17fd470e2f672215533b" name="PEAR/Command/Pickle.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="49b046cfc14747f0365e02e9c3f0e6dc" name="PEAR/Command/Registry.xml" role="php" />
- <file md5sum="7bea09a9680753183ffaa6b5cf8489d9" name="PEAR/Command/Registry.php" role="php">
+ <file md5sum="e033a30ccfa46c0ef56b8a9600a7ca49" name="PEAR/Command/Registry.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="29c02e823879b4e3e291f6b36fb339f1" name="PEAR/Command/Remote.xml" role="php" />
- <file md5sum="7ad01351a46c780f5b2b3ca46b7f2b7e" name="PEAR/Command/Remote.php" role="php">
+ <file md5sum="97b92d3af109fb1fa6a2f75d7ca8b7cc" name="PEAR/Command/Remote.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="a50c32015005e0761cc3b04679b29ed0" name="PEAR/Command/Test.xml" role="php" />
- <file md5sum="b10de7e19df1b028b45f0fd0cef3cea2" name="PEAR/Command/Test.php" role="php">
+ <file md5sum="83b2009fc56e881186bfb59d3a15a528" name="PEAR/Command/Test.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="035af3c0e87018b816c77de4613dad7e" name="PEAR/Downloader/Package.php" role="php">
+ <file md5sum="477639ffd5cfaa92e81acc6ea6ce7d6d" name="PEAR/Downloader/Package.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="2ad448f52de31562cb1aa6d4544c9a21" name="PEAR/Frontend/CLI.php" role="php">
+ <file md5sum="f3398ede1f7be447a36ffce474303c11" name="PEAR/Frontend/CLI.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="419793dcb9405b83c715b46991957170" name="PEAR/Installer/Role/Common.php" role="php">
+ <file md5sum="f88e91d8e0fdc0467a2777ff6e87eef3" name="PEAR/Installer/Role/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="d8c62e6275e3aaa7784290912406092c" name="PEAR/Installer/Role/Cfg.xml" role="php" />
- <file md5sum="71ee455e864d6ab1caf127b093cf69b9" name="PEAR/Installer/Role/Cfg.php" role="php">
+ <file md5sum="d51365d242fccf6c50e911c7dab51846" name="PEAR/Installer/Role/Cfg.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="89a4a2a286e842d45a98974f40a0565c" name="PEAR/Installer/Role/Data.xml" role="php" />
- <file md5sum="c328326a8aa119281006a547ac6851fe" name="PEAR/Installer/Role/Data.php" role="php">
+ <file md5sum="036c961fce35ded967ac35a6432aa6b4" name="PEAR/Installer/Role/Data.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="b1ce0fe105251c3b75209d6518ee69ac" name="PEAR/Installer/Role/Doc.xml" role="php" />
- <file md5sum="8831a5742304fb11b12a7106ca9aae48" name="PEAR/Installer/Role/Doc.php" role="php">
+ <file md5sum="0ca7fc1975cdd2fa2ffaf168fff23ddc" name="PEAR/Installer/Role/Doc.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="af71c0ad42d16a323afe24a4f884ef15" name="PEAR/Installer/Role/Ext.xml" role="php" />
- <file md5sum="c578fcb78bc555bb120c01d7c9daa38f" name="PEAR/Installer/Role/Ext.php" role="php">
+ <file md5sum="3f951ef15feb1ddedc11af9a55793920" name="PEAR/Installer/Role/Ext.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="ef88f0321d3e481c2130c95122cf76d8" name="PEAR/Installer/Role/Php.xml" role="php" />
- <file md5sum="6356cfb0741d160e16a82ee75f989b76" name="PEAR/Installer/Role/Php.php" role="php">
+ <file md5sum="dd0b4b3fc8a6d3fe893a9cf1357914aa" name="PEAR/Installer/Role/Php.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="746461dc3b48af6d24094cb0211608f2" name="PEAR/Installer/Role/Script.xml" role="php" />
- <file md5sum="4393edd772da70ee4e6a30fda0720abf" name="PEAR/Installer/Role/Script.php" role="php">
+ <file md5sum="2b22f9b0246a414f009c7e46509eb2ce" name="PEAR/Installer/Role/Script.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="e147d63f168ea156fc2be38caaa63804" name="PEAR/Installer/Role/Src.xml" role="php" />
- <file md5sum="543aae5ae1079a43afcefc3e8b717a35" name="PEAR/Installer/Role/Src.php" role="php">
+ <file md5sum="b202066210bd97b1f13677b9123a5dc0" name="PEAR/Installer/Role/Src.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="a24b596ec987aa5688fc19e8ed4e97ea" name="PEAR/Installer/Role/Test.xml" role="php" />
- <file md5sum="fae5cee222cd1afccb43a58f942387d4" name="PEAR/Installer/Role/Test.php" role="php">
+ <file md5sum="4fbbbc04df1c16c0674a9d0352e025ee" name="PEAR/Installer/Role/Test.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="7641e71c5785bb33a4261ebe25ed0fd7" name="PEAR/Installer/Role/Www.xml" role="php" />
- <file md5sum="d32da89753298476b60a6987d98b88be" name="PEAR/Installer/Role/Www.php" role="php">
+ <file md5sum="ae55d4d598bb887bd4d0aa7ea31e1a29" name="PEAR/Installer/Role/Www.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="3dba76d8cad0ee633749b215fa2f7bbb" name="PEAR/Installer/Role.php" role="php">
+ <file md5sum="f8d7f3f192591bb0b5354e659dcc04c0" name="PEAR/Installer/Role.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="eff7ba0329cfb00fe57bee018024edca" name="PEAR/PackageFile/Generator/v1.php" role="php">
+ <file md5sum="3b311c19d0ba9be5dabec4402441e358" name="PEAR/PackageFile/Generator/v1.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="a4de32c380f15e9a01dcbd07a2fa1062" name="PEAR/PackageFile/Generator/v2.php" role="php">
+ <file md5sum="a66a9d24f81ff2bbca09112e2150fcb1" name="PEAR/PackageFile/Generator/v2.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="7d3828c0f41aadc34d948f5215c4cd66" name="PEAR/PackageFile/Parser/v1.php" role="php">
+ <file md5sum="a26a911133ea3730650a71855b747478" name="PEAR/PackageFile/Parser/v1.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="a5f847fdba24116593efc223425a9609" name="PEAR/PackageFile/Parser/v2.php" role="php">
+ <file md5sum="3339e565f07ad7c79df48c967a94fdab" name="PEAR/PackageFile/Parser/v2.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="e964916c2b8fb5e1e947baa6dcc909d9" name="PEAR/PackageFile/v2/rw.php" role="php">
+ <file md5sum="9683a155ab03363ac882d1e1eabbbdbb" name="PEAR/PackageFile/v2/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="feebfc45a40c46bfa7665237fb8ed5f2" name="PEAR/PackageFile/v2/Validator.php" role="php">
+ <file md5sum="b1e70351c440fb2b18f40a8e7666ac4c" name="PEAR/PackageFile/v2/Validator.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="43d3f37727760235681fdf026a43fc64" name="PEAR/PackageFile/v1.php" role="php">
+ <file md5sum="92a7e44752f87ec71ac868c49b983836" name="PEAR/PackageFile/v1.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="a1bf67f5d7009889e2ba2dcb0fb635c1" name="PEAR/PackageFile/v2.php" role="php">
+ <file md5sum="29506521602492e9c60d71318c2c3734" name="PEAR/PackageFile/v2.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="cedbfe0e711e6f0d2bb6b1e0e7f12274" name="PEAR/REST/10.php" role="php">
+ <file md5sum="7d329a9780d19ea451e3252399248a9e" name="PEAR/REST/10.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="93150a26f1a37747f5e2051deae71288" name="PEAR/REST/11.php" role="php">
+ <file md5sum="03bd9ed0db8d1fb4f19b40f18b13ab1e" name="PEAR/REST/11.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="58734baedca9a15f3013a8e5e21db229" name="PEAR/REST/13.php" role="php">
+ <file md5sum="37015364cb5d619d508b9385d45d5772" name="PEAR/REST/13.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="7e8d7f5385ee8bf9150cf1f8145432dc" name="PEAR/Task/Postinstallscript/rw.php" role="php">
+ <file md5sum="cdad68b04bbc76858b46dd679c3ed0da" name="PEAR/Task/Postinstallscript/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="402e525ad2549c443f0a2d27f83df600" name="PEAR/Task/Replace/rw.php" role="php">
+ <file md5sum="990de5dff8cb0c44629beb9d30d811d4" name="PEAR/Task/Replace/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="d0116f3e8c7f0226dc1056b77185f53c" name="PEAR/Task/Unixeol/rw.php" role="php">
+ <file md5sum="758cdf1a47d12cf5afb31557bd990d18" name="PEAR/Task/Unixeol/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="eaf19cd57b5c132c350380572d81b901" name="PEAR/Task/Windowseol/rw.php" role="php">
+ <file md5sum="17212ae0bb8b1eb2b49ea3c508924ca8" name="PEAR/Task/Windowseol/rw.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="5b3adb4dc3798b128c05a1fc87fe1440" name="PEAR/Task/Common.php" role="php">
+ <file md5sum="f05d2838440df120b2c02e7a6c9739cc" name="PEAR/Task/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="e2ef901aeb745899ef48e29bcadf9409" name="PEAR/Task/Postinstallscript.php" role="php">
+ <file md5sum="05c3161b5ba178cdb100d5f77c6867c1" name="PEAR/Task/Postinstallscript.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="20b9fce126804204841f9f394f476f38" name="PEAR/Task/Replace.php" role="php">
+ <file md5sum="c1a53771989c7f2c94ba95249bcd088e" name="PEAR/Task/Replace.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="a98e009b3b41aa2efdeab4c34c56bbda" name="PEAR/Task/Unixeol.php" role="php">
+ <file md5sum="7a85755dbbacbe0193b1aacb341195c1" name="PEAR/Task/Unixeol.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="81453f45f1c0aa142ac7e829ec40e6c7" name="PEAR/Task/Windowseol.php" role="php">
+ <file md5sum="09f591d71310db1c1af856b66806400b" name="PEAR/Task/Windowseol.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="720035513393e7331b196ab39a3dc822" name="PEAR/Validator/PECL.php" role="php">
+ <file md5sum="633cedd5fbe0b873d76726f825c43452" name="PEAR/Validator/PECL.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="0b0570ebd3e3124e88cb7f520f533bbb" name="PEAR/Autoloader.php" role="php">
+ <file md5sum="75c967d7f20c7e88e5730bfa8e0f79d5" name="PEAR/Autoloader.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="a5b7b9ee6a402ffd4855a22ccc3328e3" name="PEAR/Builder.php" role="php">
+ <file md5sum="bddd56709ff8f70bfa4d4d3497ab5f6c" name="PEAR/Builder.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="6bd29d53837ee18034e8ea7bb1a5c97c" name="PEAR/ChannelFile.php" role="php">
+ <file md5sum="a7c6103aebd5afccc9aa56719f5d0738" name="PEAR/ChannelFile.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="cc6f2699a388214e35a2d2bad21cd13d" name="PEAR/Command.php" role="php">
+ <file md5sum="ad5fd8e5ba519430dc6e5009266bf33e" name="PEAR/Command.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="4fa7f5017ea636ef7101698a3633cb31" name="PEAR/Common.php" role="php">
+ <file md5sum="52c59e6a5000be2f084bfae57e7a3015" name="PEAR/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="8986d72091e1b2ca4d711ebc9fd716fe" name="PEAR/Config.php" role="php">
+ <file md5sum="3bd08408cf14b40b38f4e47b4f2f8d62" name="PEAR/Config.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="db6b82926708f636ca619b3e061dffae" name="PEAR/DependencyDB.php" role="php">
+ <file md5sum="fca80ee320f623f7dc423f804222c2f5" name="PEAR/DependencyDB.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="d4da6b74965e332e7f5dde3e391d4156" name="PEAR/Dependency2.php" role="php">
+ <file md5sum="9024f66cb48a6cf46094feeae8279927" name="PEAR/Dependency2.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="0646fba5c60d4b906889973c8e7ac6ae" name="PEAR/Downloader.php" role="php">
+ <file md5sum="4836941903f5a12263664e6894bbf86e" name="PEAR/Downloader.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="77c31950fa502d9e565653141a1f3637" name="PEAR/ErrorStack.php" role="php">
+ <file md5sum="9161368eee386cf7c39999ffb8575cc6" name="PEAR/ErrorStack.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="424a61a67dbd5f9f3ed5fc3be2b9ac54" name="PEAR/Exception.php" role="php">
+ <file md5sum="ccdd046e3dc7771152f7542deca29f89" name="PEAR/Exception.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="e0e4cbcec4a972fbad779d0f9d323120" name="PEAR/FixPHP5PEARWarnings.php" role="php" />
- <file md5sum="8d04ed7e4179548d69d0040163cb7250" name="PEAR/Frontend.php" role="php">
+ <file md5sum="301c319491f446ff7322a87cb3ce87de" name="PEAR/Frontend.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="994655f8cc16f97cd0a241c6d548f484" name="PEAR/Installer.php" role="php">
+ <file md5sum="c4b2bdcf6bdccb96a9e956391edc08c8" name="PEAR/Installer.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="ad5eb9913cd7324545f3583df670e551" name="PEAR/PackageFile.php" role="php">
+ <file md5sum="8010b321c068d18599394fb135c8f9e3" name="PEAR/PackageFile.php" role="php">
<tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
</file>
- <file md5sum="46a8ccf2a1662f008d793b0d07dfaf34" name="PEAR/Packager.php" role="php">
+ <file md5sum="db9fbd383b970f369d984f6947f71791" name="PEAR/Packager.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="289853b317cab761b6752f146feeb483" name="PEAR/Registry.php" role="php">
+ <file md5sum="f31eea0499fe1be18314ccb8137eca2a" name="PEAR/Registry.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="f789969ce01f02afc38272fe4d76bd7a" name="PEAR/REST.php" role="php">
+ <file md5sum="2a28b9ea154c19401876d105f5cc7732" name="PEAR/REST.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="b9a5d829d6897724d14b2b52b8986d74" name="PEAR/RunTest.php" role="php">
+ <file md5sum="52f7bfd1c9f910b54f9b9f30eaa6275e" name="PEAR/RunTest.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="cc4aa49c5296f475054a3054d2c33170" name="PEAR/Validate.php" role="php">
+ <file md5sum="571ba455b07af214dd508858f8f1fa77" name="PEAR/Validate.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="de6c3f7f8676896a36eef666c751987e" name="PEAR/XMLParser.php" role="php">
+ <file md5sum="1c257c0bede6f784e8105dea15108808" name="PEAR/XMLParser.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" md5sum="1b655ab71a82e0b32e4d01f644f04ab9" name="scripts/pear.bat" role="script">
@@ -7652,27 +7800,27 @@ class OS_Guess
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
<tasks:unixeol />
</file>
- <file baseinstalldir="/" md5sum="ec19ff8205b9fe9468ac567386ffc435" name="scripts/pearcmd.php" role="php">
+ <file baseinstalldir="/" md5sum="90b6d92e8c3bfb59d84a75bfcac1b69a" name="scripts/pearcmd.php" role="php">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
</file>
- <file baseinstalldir="/" md5sum="320849b646e4cdaeca543af666524e73" name="scripts/peclcmd.php" role="php">
+ <file baseinstalldir="/" md5sum="6e0dab8958f7d87561b4a5ea5a9cc703" name="scripts/peclcmd.php" role="php">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
<tasks:replace from="@pear_version@" to="version" type="package-info" />
<tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
</file>
<file md5sum="45b44486d8090de17b2a8b4211fab247" name="LICENSE" role="doc" />
- <file md5sum="dca60ef14e3f43b5fe0c31a33f1b7311" name="INSTALL" role="doc" />
+ <file md5sum="7708e944734e4ee330a467ff028e8bc2" name="INSTALL" role="doc" />
<file md5sum="4a49bc83a392934e57af45c70a589fda" name="package.dtd" role="data" />
<file md5sum="1a8f67d58009372a6cbcddd638b128cf" name="PEAR5.php" role="php" />
- <file md5sum="40a050880b2bfbaa71add94087e22db1" name="PEAR.php" role="php">
+ <file md5sum="fb4a4f4266cde1ed20c8d18072213629" name="PEAR.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
- <file md5sum="d3b517006b304817731eb77cc2154258" name="README" role="doc" />
- <file md5sum="99b954d9ba836df49368170e77748c8a" name="System.php" role="php">
+ <file md5sum="8c0b29c81943b6ff0a5f31bbca24081c" name="README" role="doc" />
+ <file md5sum="3b6e9f8261dddca82e9c261af1043847" name="System.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file md5sum="acd010e3bc43c0f72df584acde7b9158" name="template.spec" role="data" />
@@ -7696,15 +7844,13 @@ class OS_Guess
<package>
<name>Archive_Tar</name>
<channel>pear.php.net</channel>
- <min>1.1</min>
- <recommended>1.3.7</recommended>
- <exclude>1.3.0</exclude>
+ <min>1.3.7</min>
</package>
<package>
<name>Structures_Graph</name>
<channel>pear.php.net</channel>
<min>1.0.2</min>
- <recommended>1.0.3</recommended>
+ <recommended>1.0.4</recommended>
</package>
<package>
<name>Console_Getopt</name>
@@ -8089,7 +8235,7 @@ Alpha1 Release Notes:
</notes>
</release>
<release>
- <date>2009-10-10</date>
+ <date>2010-05-26</date>
<version>
<release>1.9.1</release>
<api>1.9.1</api>
@@ -8101,11 +8247,56 @@ Alpha1 Release Notes:
<license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
* svntag improvements, tag package files passed into the command and better directory checks [dufuz]
+* rely on Structures_Graph minimum version instead of recommended version [saltybeagle]
+* Fix Bug #12613: running go-pear.phar from C:\ fails [dufuz]
+* Fix Bug #14841: Installing pear into directory with space fails [dufuz]
+* Fix Bug #16644: pear.bat returns syntax error when parenthesis are in install path. [dufuz] [patch by bwaters (Bryan Waters)]
+* Fix Bug #16767: Use of Depreciated HTML Attributes in the Exception class [dufuz] [patch by fuhrysteve (Stephen J. Fuhry)]
+* Fix Bug #16864: &quot;pear list-upgrades -i&quot; issues E_WARNINGS [dufuz] [patch by rquadling (Richard Quadling)]
+* Fix Bug #17220: command `pear help` outputs to stderr instead of stdout [dufuz]
+* Fix Bug #17234: channel-discover adds port to HTTP Host header [dufuz]
+* Fix Bug #17292: Code Coverage in PEAR_RunTest does not work with namespaces [sebastian]
+* Fix Bug #17359: loadExtension() fails over missing dl() when used in multithread env [dufuz]
+* Fix Bug #17378: pear info $package fails if directory with that name exists [dufuz]
+ </notes>
+ </release>
+ <release>
+ <date>2011-02-28</date>
+ <time>18:30:00</time>
+ <version>
+ <release>1.9.2</release>
+ <api>1.9.2</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
+ <notes>
+Important! This is a security fix release. The advisory can be found at
+http://pear.php.net/advisory-20110228.txt
+
+ Bugs:
+ * Fixed Bug #17463: Regression: On Windows, svntag [patch by doconnor]
+ * Fixed Bug #17641: pecl-list doesn&apos;t sort packages by name [dufuz]
+ * Fixed Bug #17781: invalid argument warning on foreach due to an empty optional dependencie [dufuz]
+ * Fixed Bug #17801: PEAR run-tests wrongly detects php-cgi [patch by David Jean Louis (izi)]
+ * Fixed Bug #17839: pear svntag does not tag package.xml file [dufuz]
+ * Fixed Bug #17986: PEAR Installer cannot handle files moved between packages [dufuz]
+ * Fixed Bug #17997: Strange output if directories are not writeable [dufuz]
+ * Fixed Bug #18001: PEAR/RunTest coverage fails [dufuz]
+ * Fixed Bug #18056 [SECURITY]: Symlink attack in PEAR install [dufuz]
+ * Fixed Bug #18218: &quot;pear package&quot; does not allow the use of late static binding [dufuz and Christer Edvartsen]
+ * Fixed Bug #18238: Wrong return code from &quot;pear help&quot; [till]
+ * Fixed Bug #18308: Broken error message about missing channel validator [yunosh]
+
+ This feature is implemented as a result of #18056
+ * Implemented Request #16648: Use TMPDIR for builds instead of /var/tmp [dufuz]
</notes>
</release>
</changelog>
</package>
-
+
/**
* The OS_Guess class
*
@@ -8117,7 +8308,7 @@ Alpha1 Release Notes:
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Guess.php 278521 2009-04-09 22:24:12Z dufuz $
+ * @version CVS: $Id: Guess.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since PEAR 0.1
*/
@@ -8194,7 +8385,7 @@ Alpha1 Release Notes:
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -8442,7 +8633,7 @@ class OS_Guess
* indent-tabs-mode: nil
* c-basic-offset: 4
* End:
- */
+ */
/**
* PEAR_ChannelFile_Parser for parsing channel.xml
*
@@ -8453,7 +8644,7 @@ class OS_Guess
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Parser.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Parser.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -8470,7 +8661,7 @@ require_once 'PEAR/ChannelFile.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -8509,7 +8700,7 @@ class PEAR_ChannelFile_Parser extends PEAR_XMLParser
$ret->setPackagefile($file, $archive);
return $ret;
}
-}
+}
<login>
<summary>Connects and authenticates to remote server [Deprecated in favor of channel-login]</summary>
<function>doLogin</function>
@@ -8538,7 +8729,7 @@ Logs out from the remote server. This command does not actually
connect to the remote server, it only deletes the stored username and
password from your user configuration.</doc>
</logout>
-</commands>
+</commands>
/**
* PEAR_Command_Auth (login, logout commands)
*
@@ -8550,7 +8741,7 @@ password from your user configuration.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Auth.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Auth.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
* @deprecated since 1.8.0alpha1
@@ -8570,7 +8761,7 @@ require_once 'PEAR/Command/Channels.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
* @deprecated since 1.8.0alpha1
@@ -8618,7 +8809,7 @@ password from your user configuration.',
{
parent::PEAR_Command_Channels($ui, $config);
}
-}
+}
<build>
<summary>Build an Extension From C Source</summary>
<function>doBuild</function>
@@ -8627,7 +8818,7 @@ password from your user configuration.',
<doc>[package.xml]
Builds one or more extensions contained in a package.</doc>
</build>
-</commands>
+</commands>
/**
* PEAR_Command_Auth (build command)
*
@@ -8640,7 +8831,7 @@ Builds one or more extensions contained in a package.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Build.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Build.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -8660,7 +8851,7 @@ require_once 'PEAR/Command/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -8711,7 +8902,7 @@ Builds one or more extensions contained in a package.'
$this->ui->outputData(rtrim($data), 'build');
}
}
-}
+}
<list-channels>
<summary>List Available Channels</summary>
<function>doList</function>
@@ -8833,7 +9024,7 @@ the default channel is used. This command does not actually connect to the
remote server, it only deletes the stored username and password from your user
configuration.</doc>
</channel-logout>
-</commands>
+</commands>
// /* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* PEAR_Command_Channels (list-channels, update-channels, channel-delete, channel-add,
@@ -8847,7 +9038,7 @@ configuration.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Channels.php 287561 2009-08-21 22:42:58Z dufuz $
+ * @version CVS: $Id: Channels.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -8867,7 +9058,7 @@ define('PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS', -500);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -9715,7 +9906,7 @@ configuration.',
$this->config->store();
return true;
}
-}
+}
/**
* PEAR_Command_Common base class
*
@@ -9727,7 +9918,7 @@ configuration.',
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Common.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Common.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -9746,7 +9937,7 @@ require_once 'PEAR.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -9987,7 +10178,7 @@ class PEAR_Command_Common extends PEAR
return $this->$func($command, $options, $params);
}
-}
+}
<config-show>
<summary>Show All Settings</summary>
<function>doConfigShow</function>
@@ -10078,7 +10269,7 @@ PEAR installation (using the --remoteconfig option of install, upgrade,
and uninstall).
</doc>
</config-create>
-</commands>
+</commands>
/**
* PEAR_Command_Config (config-show, config-get, config-set, config-help, config-create commands)
*
@@ -10090,7 +10281,7 @@ and uninstall).
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Config.php 287554 2009-08-21 21:16:25Z dufuz $
+ * @version CVS: $Id: Config.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -10109,7 +10300,7 @@ require_once 'PEAR/Command/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -10490,7 +10681,7 @@ and uninstall).
return false;
}
-}
+}
<install>
<summary>Install Package</summary>
<function>doInstall</function>
@@ -10765,7 +10956,7 @@ package if needed.
Run post-installation scripts in package &lt;package&gt;, if any exist.
</doc>
</run-scripts>
-</commands>
+</commands>
/**
* PEAR_Command_Install (install, upgrade, upgrade-all, uninstall, bundle, run-scripts commands)
*
@@ -10777,7 +10968,7 @@ Run post-installation scripts in package &lt;package&gt;, if any exist.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Install.php 287477 2009-08-19 14:19:43Z dufuz $
+ * @version CVS: $Id: Install.php 308687 2011-02-25 23:14:27Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -10797,7 +10988,7 @@ require_once 'PEAR/Command/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -11497,7 +11688,8 @@ Run post-installation scripts in package <package>, if any exist.
if ($param->getPackageType() == 'extsrc' ||
$param->getPackageType() == 'extbin' ||
$param->getPackageType() == 'zendextsrc' ||
- $param->getPackageType() == 'zendextbin') {
+ $param->getPackageType() == 'zendextbin'
+ ) {
$pkg = &$param->getPackageFile();
if ($instbin = $pkg->getInstalledBinary()) {
$instpkg = &$instreg->getPackage($instbin, $pkg->getChannel());
@@ -11508,7 +11700,8 @@ Run post-installation scripts in package <package>, if any exist.
foreach ($instpkg->getFilelist() as $name => $atts) {
$pinfo = pathinfo($atts['installed_as']);
if (!isset($pinfo['extension']) ||
- in_array($pinfo['extension'], array('c', 'h'))) {
+ in_array($pinfo['extension'], array('c', 'h'))
+ ) {
continue; // make sure we don't match php_blah.h
}
@@ -12030,7 +12223,7 @@ Run post-installation scripts in package <package>, if any exist.
return $ret;
}
-}
+}
<download-all>
<summary>Downloads each available package from the default channel</summary>
<function>doDownloadAll</function>
@@ -12047,7 +12240,7 @@ Requests a list of available packages from the default channel ({config default_
and downloads them to current working directory. Note: only
packages within preferred_state ({config preferred_state}) will be downloaded</doc>
</download-all>
-</commands>
+</commands>
/**
* PEAR_Command_Mirror (download-all command)
*
@@ -12058,7 +12251,7 @@ packages within preferred_state ({config preferred_state}) will be downloaded</d
* @author Alexander Merz <alexmerz@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Mirror.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Mirror.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.2.0
*/
@@ -12076,7 +12269,7 @@ require_once 'PEAR/Command/Common.php';
* @author Alexander Merz <alexmerz@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.2.0
*/
@@ -12185,7 +12378,7 @@ packages within preferred_state ({config preferred_state}) will be downloaded'
return true;
}
-}
+}
<package>
<summary>Build Package</summary>
<function>doPackage</function>
@@ -12421,7 +12614,7 @@ This is not the most intelligent conversion, and should only be
used for automated conversion or learning the format.
</doc>
</convert>
-</commands>
+</commands>
/**
* PEAR_Command_Package (package, package-validate, cvsdiff, cvstag, package-dependencies,
* sign, makerpm, convert commands)
@@ -12435,7 +12628,7 @@ used for automated conversion or learning the format.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Package.php 288113 2009-09-06 21:11:55Z dufuz $
+ * @version CVS: $Id: Package.php 308690 2011-02-25 23:23:08Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -12737,7 +12930,7 @@ used for automated conversion or learning the format.
return $a;
}
- function &getPackageFile($config, $debug = false, $tmpdir = null)
+ function &getPackageFile($config, $debug = false)
{
if (!class_exists('PEAR_Common')) {
require_once 'PEAR/Common.php';
@@ -12745,7 +12938,7 @@ used for automated conversion or learning the format.
if (!class_exists('PEAR_PackageFile')) {
require_once 'PEAR/PackageFile.php';
}
- $a = &new PEAR_PackageFile($config, $debug, $tmpdir);
+ $a = &new PEAR_PackageFile($config, $debug);
$common = new PEAR_Common;
$common->ui = $this->ui;
$a->setLogger($common);
@@ -12844,7 +13037,7 @@ used for automated conversion or learning the format.
$packageFile = realpath($params[0]);
$dir = dirname($packageFile);
- $dir = substr($dir, strrpos($dir, '/') + 1);
+ $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1);
$obj = &$this->getPackageFile($this->config, $this->_debug);
$info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($info)) {
@@ -12904,7 +13097,7 @@ used for automated conversion or learning the format.
}
// Check if tag already exists
- $releaseTag = $path['local']['base'] . 'tags/' . $svntag;
+ $releaseTag = $path['local']['base'] . 'tags' . DIRECTORY_SEPARATOR . $svntag;
$existsCommand = 'svn ls ' . $path['base'] . 'tags/';
$fp = popen($existsCommand, "r");
@@ -12914,7 +13107,7 @@ used for automated conversion or learning the format.
}
pclose($fp);
- if (in_array($svntag . '/', explode("\n", $out))) {
+ if (in_array($svntag . DIRECTORY_SEPARATOR, explode("\n", $out))) {
$this->ui->outputData($this->output, $command);
return $this->raiseError('SVN tag ' . $svntag . ' for ' . $package . ' already exists.');
} elseif (file_exists($path['local']['base'] . 'tags') === false) {
@@ -12944,8 +13137,11 @@ used for automated conversion or learning the format.
$command .= ' copy --parents ';
$dir = dirname($packageFile);
- $dir = substr($dir, strrpos($dir, '/') + 1);
+ $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1);
$files = array_keys($info->getFilelist());
+ if (!in_array(basename($packageFile), $files)) {
+ $files[] = basename($packageFile);
+ }
array_shift($params);
if (count($params)) {
@@ -13003,10 +13199,10 @@ used for automated conversion or learning the format.
$path['from'] = substr($url, 0, strrpos($url, '/'));
$path['base'] = substr($path['from'], 0, strrpos($path['from'], '/') + 1);
- // Figure out the local paths
- $pos = strpos($file, '/trunk/');
+ // Figure out the local paths - see http://pear.php.net/bugs/17463
+ $pos = strpos($file, DIRECTORY_SEPARATOR . 'trunk' . DIRECTORY_SEPARATOR);
if ($pos === false) {
- $pos = strpos($file, '/branches/');
+ $pos = strpos($file, DIRECTORY_SEPARATOR . 'branches' . DIRECTORY_SEPARATOR);
}
$path['local']['base'] = substr($file, 0, $pos + 1);
@@ -13392,7 +13588,9 @@ used for automated conversion or learning the format.
}
$tar = new Archive_Tar($params[0]);
- $tmpdir = System::mktemp('-d pearsign');
+
+ $tmpdir = $this->config->get('temp_dir');
+ $tmpdir = System::mktemp(" -t $tmpdir -d pearsign");
if (!$tar->extractList('package2.xml package.xml package.sig', $tmpdir)) {
return $this->raiseError("failed to extract tar file");
}
@@ -13539,7 +13737,7 @@ used for automated conversion or learning the format.
$this->ui->outputData('Wrote new version 2.0 package.xml to "' . $saved . '"');
return true;
}
-}
+}
<pickle>
<summary>Build PECL Package</summary>
<function>doPackage</function>
@@ -13574,7 +13772,7 @@ uses any of these features, you are best off using PEAR_PackageFileManager to
generate both package.xml.
</doc>
</pickle>
-</commands>
+</commands>
/**
* PEAR_Command_Pickle (pickle command)
*
@@ -13585,7 +13783,7 @@ generate both package.xml.
* @author Greg Beaver <cellog@php.net>
* @copyright 2005-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Pickle.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Pickle.php 308687 2011-02-25 23:14:27Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.1
*/
@@ -13603,7 +13801,7 @@ require_once 'PEAR/Command/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 2005-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.1
*/
@@ -13680,7 +13878,7 @@ generate both package.xml.
* @param string|null $tmpdir
* @return PEAR_PackageFile
*/
- function &getPackageFile($config, $debug = false, $tmpdir = null)
+ function &getPackageFile($config, $debug = false)
{
if (!class_exists('PEAR_Common')) {
require_once 'PEAR/Common.php';
@@ -13690,7 +13888,7 @@ generate both package.xml.
require_once 'PEAR/PackageFile.php';
}
- $a = &new PEAR_PackageFile($config, $debug, $tmpdir);
+ $a = &new PEAR_PackageFile($config, $debug);
$common = new PEAR_Common;
$common->ui = $this->ui;
$a->setLogger($common);
@@ -13994,7 +14192,7 @@ generate both package.xml.
$gen = &$pf->getDefaultGenerator();
$gen->toPackageFile('.');
}
-}
+}
<list>
<summary>List Installed Packages In The Default Channel</summary>
<function>doList</function>
@@ -14051,7 +14249,7 @@ Displays information about a package. The package argument may be a
local package file, an URL to a package file, or the name of an
installed package.</doc>
</info>
-</commands>
+</commands>
/**
* PEAR_Command_Registry (list, list-files, shell-test, info commands)
*
@@ -14063,7 +14261,7 @@ installed package.</doc>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Registry.php 299146 2010-05-08 16:26:13Z dufuz $
+ * @version CVS: $Id: Registry.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -14082,7 +14280,7 @@ require_once 'PEAR/Command/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -15195,7 +15393,7 @@ installed package.'
$data['raw'] = $obj->getArray(); // no validation needed
$this->ui->outputData($data, 'package-info');
}
-}
+}
<remote-info>
<summary>Information About Remote Packages</summary>
<function>doRemoteInfo</function>
@@ -15303,7 +15501,7 @@ Clear the XML-RPC/REST cache. See also the cache_ttl configuration
parameter.
</doc>
</clear-cache>
-</commands>
+</commands>
/**
* PEAR_Command_Remote (remote-info, list-upgrades, remote-list, search, list-all, download,
* clear-cache commands)
@@ -15316,7 +15514,7 @@ parameter.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Remote.php 287477 2009-08-19 14:19:43Z dufuz $
+ * @version CVS: $Id: Remote.php 308687 2011-02-25 23:14:27Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -15336,7 +15534,7 @@ require_once 'PEAR/REST.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -15449,7 +15647,7 @@ version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz.',
'shortcut' => 'cc',
'options' => array(),
'doc' => '
-Clear the XML-RPC/REST cache. See also the cache_ttl configuration
+Clear the REST cache. See also the cache_ttl configuration
parameter.
',
),
@@ -16081,6 +16279,7 @@ parameter.
if ($verbose >= 1) {
$output .= "reading directory $cache_dir\n";
}
+
$num = 0;
while ($ent = readdir($dp)) {
if (preg_match('/rest.cache(file|id)\\z/', $ent)) {
@@ -16111,7 +16310,7 @@ parameter.
$this->ui->outputData(rtrim($output), $command);
return $num;
}
-}
+}
<run-tests>
<summary>Run Regression Tests</summary>
<function>doRunTests</function>
@@ -16164,7 +16363,7 @@ If none is found, all .phpt tests will be tried instead.</doc>
<doc>[testfile|dir ...]
Run regression tests with PHP&#039;s regression testing script (run-tests.php).</doc>
</run-tests>
-</commands>
+</commands>
/**
* PEAR_Command_Test (run-tests)
*
@@ -16177,7 +16376,7 @@ Run regression tests with PHP&#039;s regression testing script (run-tests.php).<
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Test.php 279072 2009-04-20 19:57:41Z cellog $
+ * @version CVS: $Id: Test.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -16197,7 +16396,7 @@ require_once 'PEAR/Command/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -16500,7 +16699,7 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
return true;
}
-}
+}
/**
* PEAR_Downloader_Package
*
@@ -16511,7 +16710,7 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Package.php 287560 2009-08-21 22:36:18Z dufuz $
+ * @version CVS: $Id: Package.php 308687 2011-02-25 23:14:27Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -16552,7 +16751,7 @@ define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -17878,6 +18077,8 @@ class PEAR_Downloader_Package
continue;
}
+ // FIXME do symlink check
+
fwrite($fp, $filecontents, strlen($filecontents));
fclose($fp);
if ($s = $params[$i]->explicitState()) {
@@ -17999,13 +18200,12 @@ class PEAR_Downloader_Package
* @param int
* @param string
*/
- function &getPackagefileObject(&$c, $d, $t = false)
+ function &getPackagefileObject(&$c, $d)
{
- $a = &new PEAR_PackageFile($c, $d, $t);
+ $a = &new PEAR_PackageFile($c, $d);
return $a;
}
-
/**
* This will retrieve from a local file if possible, and parse out
* a group name as well. The original parameter will be modified to reflect this.
@@ -18029,16 +18229,7 @@ class PEAR_Downloader_Package
if (@is_file($param)) {
$this->_type = 'local';
$options = $this->_downloader->getOptions();
- if (isset($options['downloadonly'])) {
- $pkg = &$this->getPackagefileObject($this->_config,
- $this->_downloader->_debug);
- } else {
- if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) {
- return $dir;
- }
- $pkg = &$this->getPackagefileObject($this->_config,
- $this->_downloader->_debug, $dir);
- }
+ $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->_debug);
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING);
PEAR::popErrorHandling();
@@ -18110,15 +18301,7 @@ class PEAR_Downloader_Package
}
// whew, download worked!
- if (isset($options['downloadonly'])) {
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug);
- } else {
- $dir = $this->_downloader->getDownloadDir();
- if (PEAR::isError($dir)) {
- return $dir;
- }
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug, $dir);
- }
+ $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug);
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$pf = &$pkg->fromAnyFile($file, PEAR_VALIDATE_INSTALLING);
@@ -18503,7 +18686,7 @@ class PEAR_Downloader_Package
return $info;
}
-}
+}
/**
* PEAR_Frontend_CLI
*
@@ -18515,7 +18698,7 @@ class PEAR_Downloader_Package
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: CLI.php 296938 2010-03-27 16:16:25Z dufuz $
+ * @version CVS: $Id: CLI.php 308695 2011-02-25 23:40:14Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -18532,7 +18715,7 @@ require_once 'PEAR/Frontend.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -18901,7 +19084,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
case 'install':
case 'upgrade':
case 'upgrade-all':
- if (isset($data['release_warnings'])) {
+ if (is_array($data) && isset($data['release_warnings'])) {
$this->_displayLine('');
$this->_startTable(array(
'border' => false,
@@ -18912,7 +19095,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
$this->_displayLine('');
}
- $this->_displayLine($data['data']);
+ $this->_displayLine(is_array($data) ? $data['data'] : $data);
break;
case 'search':
$this->_startTable($data);
@@ -18920,12 +19103,19 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
}
+ $packages = array();
foreach($data['data'] as $category) {
- foreach($category as $pkg) {
- $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
+ foreach($category as $name => $pkg) {
+ $packages[$pkg[0]] = $pkg;
}
}
+ $p = array_keys($packages);
+ natcasesort($p);
+ foreach ($p as $name) {
+ $this->_tableRow($packages[$name], null, array(1 => array('wrap' => 55)));
+ }
+
$this->_endTable();
break;
case 'list-all':
@@ -18939,13 +19129,21 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
}
+ $packages = array();
foreach($data['data'] as $category) {
- foreach($category as $pkg) {
- unset($pkg[4], $pkg[5]);
- $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
+ foreach($category as $name => $pkg) {
+ $packages[$pkg[0]] = $pkg;
}
}
+ $p = array_keys($packages);
+ natcasesort($p);
+ foreach ($p as $name) {
+ $pkg = $packages[$name];
+ unset($pkg[4], $pkg[5]);
+ $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
+ }
+
$this->_endTable();
break;
case 'config-show':
@@ -19238,7 +19436,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
{
print $text;
}
-}
+}
/**
* Base class for all installation roles.
*
@@ -19249,7 +19447,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Common.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Common.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19264,7 +19462,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -19411,7 +19609,7 @@ class PEAR_Installer_Role_Common
return $roleInfo['phpextension'];
}
}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -19425,7 +19623,7 @@ class PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Cfg
*
@@ -19436,7 +19634,7 @@ class PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 2007-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Cfg.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Cfg.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.7.0
*/
@@ -19447,7 +19645,7 @@ class PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 2007-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.7.0
*/
@@ -19530,7 +19728,7 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
return $test;
}
-}
+}
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -19544,7 +19742,7 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Data
*
@@ -19555,7 +19753,7 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Data.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Data.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19566,12 +19764,12 @@ class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -19585,7 +19783,7 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Doc
*
@@ -19596,7 +19794,7 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Doc.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Doc.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19607,12 +19805,12 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>extbin</releasetypes>
<releasetypes>zendextbin</releasetypes>
<installable>1</installable>
@@ -19623,7 +19821,7 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
<executable />
<phpextension>1</phpextension>
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Ext
*
@@ -19634,7 +19832,7 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Ext.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Ext.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19645,12 +19843,12 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -19664,7 +19862,7 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Php
*
@@ -19675,7 +19873,7 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Php.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Php.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19686,12 +19884,12 @@ class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -19705,7 +19903,7 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
<executable>1</executable>
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Script
*
@@ -19716,7 +19914,7 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Script.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Script.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19727,12 +19925,12 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>extsrc</releasetypes>
<releasetypes>zendextsrc</releasetypes>
<installable>1</installable>
@@ -19743,7 +19941,7 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Src
*
@@ -19754,7 +19952,7 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Src.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Src.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19765,7 +19963,7 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -19776,7 +19974,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
$installer->source_files++;
}
}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -19790,7 +19988,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Test
*
@@ -19801,7 +19999,7 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Test.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Test.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19812,12 +20010,12 @@ class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
-?>
+?>
<releasetypes>php</releasetypes>
<releasetypes>extsrc</releasetypes>
<releasetypes>extbin</releasetypes>
@@ -19831,7 +20029,7 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
<executable />
<phpextension />
<config_vars />
-</role>
+</role>
/**
* PEAR_Installer_Role_Www
*
@@ -19842,7 +20040,7 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 2007-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Www.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Www.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.7.0
*/
@@ -19853,12 +20051,12 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 2007-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.7.0
*/
class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {}
-?>
+?>
/**
* PEAR_Installer_Role
*
@@ -19869,7 +20067,7 @@ class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Role.php 278552 2009-04-10 19:42:49Z dufuz $
+ * @version CVS: $Id: Role.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -19885,7 +20083,7 @@ require_once 'PEAR/XMLParser.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -20133,7 +20331,7 @@ class PEAR_Installer_Role
PEAR_Installer_Role::getValidRoles('****', true);
return true;
}
-}
+}
/**
* package.xml generation class, package.xml version 1.0
*
@@ -20144,7 +20342,7 @@ class PEAR_Installer_Role
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: v1.php 286494 2009-07-29 06:57:11Z dufuz $
+ * @version CVS: $Id: v1.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -20164,7 +20362,7 @@ require_once 'PEAR/PackageFile/v2.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -20181,7 +20379,7 @@ class PEAR_PackageFile_Generator_v1
function getPackagerVersion()
{
- return '1.9.1';
+ return '1.9.2';
}
/**
@@ -20335,7 +20533,7 @@ class PEAR_PackageFile_Generator_v1
);
$ret = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
$ret .= "<!DOCTYPE package SYSTEM \"http://pear.php.net/dtd/package-1.0\">\n";
- $ret .= "<package version=\"1.0\" packagerversion=\"1.9.1\">\n" .
+ $ret .= "<package version=\"1.0\" packagerversion=\"1.9.2\">\n" .
" <name>$pkginfo[package]</name>";
if (isset($pkginfo['extends'])) {
$ret .= "\n<extends>$pkginfo[extends]</extends>";
@@ -21416,7 +21614,7 @@ class PEAR_PackageFile_Generator_v1
return $ret;
}
}
-?>
+?>
/**
* package.xml generation class, package.xml version 2.0
*
@@ -21428,7 +21626,7 @@ class PEAR_PackageFile_Generator_v1
* @author Stephan Schmidt (original XML_Serializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: v2.php 278907 2009-04-17 21:10:04Z dufuz $
+ * @version CVS: $Id: v2.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -21449,7 +21647,7 @@ require_once 'XML/Util.php';
* @author Stephan Schmidt (original XML_Serializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -21531,7 +21729,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
*/
function getPackagerVersion()
{
- return '1.9.1';
+ return '1.9.2';
}
/**
@@ -21816,7 +22014,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
$this->options['beautifyFilelist'] = true;
}
- $arr['attribs']['packagerversion'] = '1.9.1';
+ $arr['attribs']['packagerversion'] = '1.9.2';
if ($this->serialize($arr, $options)) {
return $this->_serializedData . "\n";
}
@@ -22308,7 +22506,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
}
return $tag;
}
-}
+}
/**
* package.xml parsing class, package.xml version 1.0
*
@@ -22319,7 +22517,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: v1.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: v1.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -22766,7 +22964,7 @@ class PEAR_PackageFile_Parser_v1
// }}}
}
-?>
+?>
/**
* package.xml parsing class, package.xml version 2.0
*
@@ -22777,7 +22975,7 @@ class PEAR_PackageFile_Parser_v1
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: v2.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: v2.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -22878,7 +23076,7 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
$ret->setPackagefile($file, $archive);
return $ret;
}
-}
+}
/**
* PEAR_PackageFile_v2, package.xml version 2.0, read/write version
*
@@ -22889,7 +23087,7 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: rw.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: rw.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -22903,7 +23101,7 @@ require_once 'PEAR/PackageFile/v2.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a8
*/
@@ -24481,7 +24679,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
{
unset($this->_packageInfo['changelog']);
}
-}
+}
/**
* PEAR_PackageFile_v2, package.xml version 2.0, read/write version
*
@@ -24492,7 +24690,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Validator.php 277885 2009-03-27 19:29:31Z dufuz $
+ * @version CVS: $Id: Validator.php 308729 2011-02-27 18:58:21Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -24504,7 +24702,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a8
* @access private
@@ -24595,7 +24793,7 @@ class PEAR_PackageFile_v2_Validator
isset($test['dependencies']['required']) &&
isset($test['dependencies']['required']['pearinstaller']) &&
isset($test['dependencies']['required']['pearinstaller']['min']) &&
- version_compare('1.9.1',
+ version_compare('1.9.2',
$test['dependencies']['required']['pearinstaller']['min'], '<')
) {
$this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
@@ -24739,11 +24937,10 @@ class PEAR_PackageFile_v2_Validator
$validator = $chan->getValidationObject($this->_pf->getPackage());
if (!$validator) {
$this->_stack->push(__FUNCTION__, 'error',
- array_merge(
- array('channel' => $chan->getName(),
- 'package' => $this->_pf->getPackage()),
- $valpack
- ),
+ array('channel' => $chan->getName(),
+ 'package' => $this->_pf->getPackage(),
+ 'name' => $valpack['_content'],
+ 'version' => $valpack['attribs']['version']),
'package "%channel%/%package%" cannot be properly validated without ' .
'validation package "%channel%/%name%-%version%"');
return $this->_isValid = 0;
@@ -25834,7 +26031,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 1.9.1');
+ 'version 1.9.2');
}
function _invalidTagOrder($oktags, $actual, $root)
@@ -26528,7 +26725,8 @@ class PEAR_PackageFile_v2_Validator
}
continue 2;
case T_DOUBLE_COLON:
- if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) {
+ $token = $tokens[$i - 1][0];
+ if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC)) {
if (isset($this->_stack)) {
$this->_stack->push(__FUNCTION__, 'warning', array('file' => $file),
'Parser error: invalid PHP found in file "%file%"');
@@ -26634,7 +26832,7 @@ class PEAR_PackageFile_v2_Validator
return $providesret;
}
-}
+}
/**
* PEAR_PackageFile_v1, package.xml version 1.0
*
@@ -26645,7 +26843,7 @@ class PEAR_PackageFile_v2_Validator
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: v1.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: v1.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -26911,7 +27109,7 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME', 52);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -28246,7 +28444,7 @@ class PEAR_PackageFile_v1
// }}}
}
?>
-
+
/**
* PEAR_PackageFile_v2, package.xml version 2.0
*
@@ -28257,7 +28455,7 @@ class PEAR_PackageFile_v1
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: v2.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: v2.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -28271,7 +28469,7 @@ require_once 'PEAR/ErrorStack.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -30291,7 +30489,7 @@ class PEAR_PackageFile_v2
}
}
?>
-
+
/**
* PEAR_REST_10
*
@@ -30302,7 +30500,7 @@ class PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: 10.php 287558 2009-08-21 22:21:28Z dufuz $
+ * @version CVS: $Id: 10.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -30320,7 +30518,7 @@ require_once 'PEAR/REST.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a12
*/
@@ -31157,7 +31355,7 @@ class PEAR_REST_10
return 1;
}
}
-}
+}
/**
* PEAR_REST_11 - implement faster list-all/remote-list command
*
@@ -31168,7 +31366,7 @@ class PEAR_REST_10
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: 11.php 286670 2009-08-02 14:16:06Z dufuz $
+ * @version CVS: $Id: 11.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.3
*/
@@ -31186,7 +31384,7 @@ require_once 'PEAR/REST.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.3
*/
@@ -31497,7 +31695,7 @@ class PEAR_REST_11
return array_slice($states, $i + 1);
}
}
-?>
+?>
/**
* PEAR_REST_13
*
@@ -31508,7 +31706,7 @@ class PEAR_REST_11
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: 13.php 287110 2009-08-11 18:51:15Z dufuz $
+ * @version CVS: $Id: 13.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a12
*/
@@ -31527,7 +31725,7 @@ require_once 'PEAR/REST/10.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a12
*/
@@ -31795,7 +31993,7 @@ class PEAR_REST_13 extends PEAR_REST_10
return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel);
}
-}
+}
/**
* <tasks:postinstallscript> - read/write version
*
@@ -31806,7 +32004,7 @@ class PEAR_REST_13 extends PEAR_REST_10
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: rw.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: rw.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -31821,7 +32019,7 @@ require_once 'PEAR/Task/Postinstallscript.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -31963,7 +32161,7 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
);
}
}
-?>
+?>
/**
* <tasks:replace> - read/write version
*
@@ -31974,7 +32172,7 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: rw.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: rw.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -31989,7 +32187,7 @@ require_once 'PEAR/Task/Replace.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -32023,7 +32221,7 @@ class PEAR_Task_Replace_rw extends PEAR_Task_Replace
return $this->_params;
}
}
-?>
+?>
/**
* <tasks:unixeol> - read/write version
*
@@ -32034,7 +32232,7 @@ class PEAR_Task_Replace_rw extends PEAR_Task_Replace
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: rw.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: rw.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -32049,7 +32247,7 @@ require_once 'PEAR/Task/Unixeol.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -32078,7 +32276,7 @@ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
return '';
}
}
-?>
+?>
/**
* <tasks:windowseol> - read/write version
*
@@ -32089,7 +32287,7 @@ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: rw.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: rw.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
*/
@@ -32104,7 +32302,7 @@ require_once 'PEAR/Task/Windowseol.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -32133,7 +32331,7 @@ class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
return '';
}
}
-?>
+?>
/**
* PEAR_Task_Common, base class for installer tasks
*
@@ -32144,7 +32342,7 @@ class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Common.php 276394 2009-02-25 00:15:49Z dufuz $
+ * @version CVS: $Id: Common.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -32182,7 +32380,7 @@ define('PEAR_TASK_PACKAGEANDINSTALL', 3);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @abstract
@@ -32334,7 +32532,7 @@ class PEAR_Task_Common
return PEAR::raiseError($msg, $code);
}
}
-?>
+?>
/**
* <tasks:postinstallscript>
*
@@ -32345,7 +32543,7 @@ class PEAR_Task_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Postinstallscript.php 276385 2009-02-24 23:46:03Z dufuz $
+ * @version CVS: $Id: Postinstallscript.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -32363,7 +32561,7 @@ require_once 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -32656,7 +32854,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
{
}
}
-?>
+?>
/**
* <tasks:replace>
*
@@ -32667,7 +32865,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Replace.php 276394 2009-02-25 00:15:49Z dufuz $
+ * @version CVS: $Id: Replace.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -32682,7 +32880,7 @@ require_once 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -32831,7 +33029,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
return $contents;
}
}
-?>
+?>
/**
* <tasks:unixeol>
*
@@ -32842,7 +33040,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Unixeol.php 276394 2009-02-25 00:15:49Z dufuz $
+ * @version CVS: $Id: Unixeol.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -32857,7 +33055,7 @@ require_once 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -32907,7 +33105,7 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents);
}
}
-?>
+?>
/**
* <tasks:windowseol>
*
@@ -32918,7 +33116,7 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Windowseol.php 276394 2009-02-25 00:15:49Z dufuz $
+ * @version CVS: $Id: Windowseol.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -32933,7 +33131,7 @@ require_once 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -32983,7 +33181,7 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents);
}
}
-?>
+?>
/**
* Channel Validator for the pecl.php.net channel
*
@@ -32994,7 +33192,7 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: PECL.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: PECL.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a5
*/
@@ -33009,7 +33207,7 @@ require_once 'PEAR/Validate.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a5
*/
@@ -33045,7 +33243,7 @@ class PEAR_Validator_PECL extends PEAR_Validate
return $ret;
}
}
-?>
+?>
/**
* Class auto-loader
*
@@ -33057,7 +33255,7 @@ class PEAR_Validator_PECL extends PEAR_Validate
* @author Stig Bakken <ssb@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Autoloader.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Autoloader.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
* @since File available since Release 0.1
* @deprecated File deprecated in Release 1.4.0a1
@@ -33092,7 +33290,7 @@ require_once "PEAR.php";
* @author Stig Bakken <ssb@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
* @since File available since Release 0.1
* @deprecated File deprecated in Release 1.4.0a1
@@ -33263,7 +33461,7 @@ class PEAR_Autoloader extends PEAR
overload("PEAR_Autoloader");
?>
-
+
/**
* PEAR_Builder for building PHP extensions (PECL packages)
*
@@ -33275,7 +33473,7 @@ overload("PEAR_Autoloader");
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Builder.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Builder.php 308687 2011-02-25 23:14:27Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*
@@ -33298,7 +33496,7 @@ require_once 'PEAR/PackageFile.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since PHP 4.0.2
* @see http://pear.php.net/manual/en/core.ppm.pear-builder.php
@@ -33485,7 +33683,7 @@ class PEAR_Builder extends PEAR_Common
/**
* Build an extension from source. Runs "phpize" in the source
* directory, but compiles in a temporary directory
- * (/var/tmp/pear-build-USER/PACKAGE-VERSION).
+ * (TMPDIR/pear-build-USER/PACKAGE-VERSION).
*
* @param string|PEAR_PackageFile_v* $descfile path to XML package description file, or
* a PEAR_PackageFile object
@@ -33515,6 +33713,7 @@ class PEAR_Builder extends PEAR_Common
' appears to have a prefix ' . $matches[2] . ', but' .
' config variable php_prefix does not match');
}
+
if (isset($matches[3]) && strlen($matches[3]) &&
trim($matches[3]) != trim($this->config->get('php_suffix'))) {
$this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') .
@@ -33523,14 +33722,15 @@ class PEAR_Builder extends PEAR_Common
}
}
-
$this->current_callback = $callback;
if (PEAR_OS == "Windows") {
return $this->_build_win32($descfile, $callback);
}
+
if (PEAR_OS != 'Unix') {
return $this->raiseError("building extensions not supported on this platform");
}
+
if (is_object($descfile)) {
$pkg = $descfile;
$descfile = $pkg->getPackageFile();
@@ -33549,14 +33749,17 @@ class PEAR_Builder extends PEAR_Common
}
$dir = dirname($descfile);
}
+
$old_cwd = getcwd();
if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) {
return $this->raiseError("could not chdir to $dir");
}
+
$vdir = $pkg->getPackage() . '-' . $pkg->getVersion();
if (is_dir($vdir)) {
chdir($vdir);
}
+
$dir = getcwd();
$this->log(2, "building in $dir");
putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH'));
@@ -33567,6 +33770,7 @@ class PEAR_Builder extends PEAR_Common
if (PEAR::isError($err)) {
return $err;
}
+
if (!$err) {
return $this->raiseError("`phpize' failed");
}
@@ -33592,30 +33796,31 @@ class PEAR_Builder extends PEAR_Common
// }}} end of interactive part
// FIXME make configurable
- if(!$user=getenv('USER')){
+ if (!$user=getenv('USER')) {
$user='defaultuser';
}
- $build_basedir = "/var/tmp/pear-build-$user";
+
+ $tmpdir = $this->config->get('temp_dir');
+ $build_basedir = System::mktemp(" -t $tmpdir -d pear-build-$user");
$build_dir = "$build_basedir/$vdir";
$inst_dir = "$build_basedir/install-$vdir";
$this->log(1, "building in $build_dir");
if (is_dir($build_dir)) {
System::rm(array('-rf', $build_dir));
}
+
if (!System::mkDir(array('-p', $build_dir))) {
return $this->raiseError("could not create build dir: $build_dir");
}
+
$this->addTempFile($build_dir);
if (!System::mkDir(array('-p', $inst_dir))) {
return $this->raiseError("could not create temporary install dir: $inst_dir");
}
$this->addTempFile($inst_dir);
- if (getenv('MAKE')) {
- $make_command = getenv('MAKE');
- } else {
- $make_command = 'make';
- }
+ $make_command = getenv('MAKE') ? getenv('MAKE') : 'make';
+
$to_run = array(
$configure_command,
$make_command,
@@ -33625,7 +33830,7 @@ class PEAR_Builder extends PEAR_Common
if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) {
return $this->raiseError("could not chdir to $build_dir");
}
- putenv('PHP_PEAR_VERSION=1.9.1');
+ putenv('PHP_PEAR_VERSION=1.9.2');
foreach ($to_run as $cmd) {
$err = $this->_runCommand($cmd, $callback);
if (PEAR::isError($err)) {
@@ -33736,7 +33941,7 @@ class PEAR_Builder extends PEAR_Common
}
return PEAR_Common::log($level, $msg);
}
-}
+}
/**
* PEAR_ChannelFile, the channel handling class
*
@@ -33747,7 +33952,7 @@ class PEAR_Builder extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: ChannelFile.php 286951 2009-08-09 14:41:22Z dufuz $
+ * @version CVS: $Id: ChannelFile.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -33884,7 +34089,7 @@ $GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server');
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -35294,7 +35499,7 @@ class PEAR_ChannelFile
return time();
}
-}
+}
/**
* PEAR_Command, command pattern class
*
@@ -35306,7 +35511,7 @@ class PEAR_ChannelFile
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Command.php 286494 2009-07-29 06:57:11Z dufuz $
+ * @version CVS: $Id: Command.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -35390,7 +35595,7 @@ $GLOBALS['_PEAR_Command_objects'] = array();
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -35707,7 +35912,7 @@ class PEAR_Command
return false;
}
// }}}
-}
+}
/**
* PEAR_Common, the base class for the PEAR Installer
*
@@ -35720,7 +35925,7 @@ class PEAR_Command
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Common.php 282969 2009-06-28 23:09:27Z dufuz $
+ * @version CVS: $Id: Common.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1.0
* @deprecated File deprecated since Release 1.4.0a1
@@ -35827,7 +36032,7 @@ $GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'p
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @deprecated This class will disappear, and its components will be spread
@@ -36543,7 +36748,7 @@ class PEAR_Common extends PEAR
}
require_once 'PEAR/Config.php';
-require_once 'PEAR/PackageFile.php';
+require_once 'PEAR/PackageFile.php';
/**
* PEAR_Config, customized configuration handling for the PEAR Installer
*
@@ -36555,7 +36760,7 @@ require_once 'PEAR/PackageFile.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Config.php 286480 2009-07-29 02:50:02Z dufuz $
+ * @version CVS: $Id: Config.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -36791,7 +36996,7 @@ if (getenv('PHP_PEAR_SIG_KEYDIR')) {
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -38640,7 +38845,7 @@ class PEAR_Config extends PEAR
}
}
}
-
+
/**
* PEAR_DependencyDB, advanced installed packages dependency database
*
@@ -38652,7 +38857,7 @@ class PEAR_Config extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: DependencyDB.php 286686 2009-08-02 17:38:57Z dufuz $
+ * @version CVS: $Id: DependencyDB.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -38672,7 +38877,7 @@ $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array();
* @author Tomas V.V.Cox <cox@idec.net.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -39408,7 +39613,7 @@ class PEAR_DependencyDB
);
}
}
-}
+}
/**
* PEAR_Dependency2, advanced dependency validation
*
@@ -39419,7 +39624,7 @@ class PEAR_DependencyDB
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Dependency2.php 286494 2009-07-29 06:57:11Z dufuz $
+ * @version CVS: $Id: Dependency2.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -39441,7 +39646,7 @@ require_once 'PEAR/Validate.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -39951,7 +40156,7 @@ class PEAR_Dependency2
*/
function getPEARVersion()
{
- return '1.9.1';
+ return '1.9.2';
}
function validatePearinstallerDependency($dep)
@@ -40765,7 +40970,7 @@ class PEAR_Dependency2
return array(sprintf($msg, $this->_registry->parsedPackageNameToString(
$this->_currentPackage, true)));
}
-}
+}
/**
* PEAR_Downloader, the PEAR Installer's download utility class
*
@@ -40779,7 +40984,7 @@ class PEAR_Dependency2
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Downloader.php 296767 2010-03-25 00:58:33Z dufuz $
+ * @version CVS: $Id: Downloader.php 308691 2011-02-25 23:25:02Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -40806,7 +41011,7 @@ define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2);
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.0
*/
@@ -40956,7 +41161,8 @@ class PEAR_Downloader extends PEAR_Common
require_once 'System.php';
}
- $tmp = System::mktemp(array('-d'));
+ $tmpdir = $this->config->get('temp_dir');
+ $tmp = System::mktemp("-d -t $tmpdir");
$a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false);
PEAR::popErrorHandling();
if (PEAR::isError($a)) {
@@ -41260,14 +41466,13 @@ class PEAR_Downloader extends PEAR_Common
*/
function analyzeDependencies(&$params, $force = false)
{
- $hasfailed = $failed = false;
if (isset($this->_options['downloadonly'])) {
return;
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$redo = true;
- $reset = false;
+ $reset = $hasfailed = $failed = false;
while ($redo) {
$redo = false;
foreach ($params as $i => $param) {
@@ -41320,7 +41525,7 @@ class PEAR_Downloader extends PEAR_Common
}
$failed = false;
- if (isset($deps['required'])) {
+ if (isset($deps['required']) && is_array($deps['required'])) {
foreach ($deps['required'] as $type => $dep) {
// note: Dependency2 will never return a PEAR_Error if ignore-errors
// is specified, so soft is needed to turn off logging
@@ -41354,7 +41559,7 @@ class PEAR_Downloader extends PEAR_Common
}
}
- if (isset($deps['optional'])) {
+ if (isset($deps['optional']) && is_array($deps['optional'])) {
foreach ($deps['optional'] as $type => $dep) {
if (!isset($dep[0])) {
if (PEAR::isError($e =
@@ -41465,6 +41670,7 @@ class PEAR_Downloader extends PEAR_Common
}
}
}
+
PEAR::staticPopErrorHandling();
if ($hasfailed && (isset($this->_options['ignore-errors']) ||
isset($this->_options['nodeps']))) {
@@ -41485,6 +41691,7 @@ class PEAR_Downloader extends PEAR_Common
if (isset($this->_downloadDir)) {
return $this->_downloadDir;
}
+
$downloaddir = $this->config->get('download_dir');
if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) {
if (is_dir($downloaddir) && !is_writable($downloaddir)) {
@@ -41492,14 +41699,17 @@ class PEAR_Downloader extends PEAR_Common
'" is not writeable. Change download_dir config variable to ' .
'a writeable dir to avoid this warning');
}
+
if (!class_exists('System')) {
require_once 'System.php';
}
+
if (PEAR::isError($downloaddir = System::mktemp('-d'))) {
return $downloaddir;
}
$this->log(3, '+ tmp dir created at ' . $downloaddir);
}
+
if (!is_writable($downloaddir)) {
if (PEAR::isError(System::mkdir(array('-p', $downloaddir))) ||
!is_writable($downloaddir)) {
@@ -41508,6 +41718,7 @@ class PEAR_Downloader extends PEAR_Common
'a writeable dir');
}
}
+
return $this->_downloadDir = $downloaddir;
}
@@ -41538,27 +41749,11 @@ class PEAR_Downloader extends PEAR_Common
$this->_options = $options;
}
- // }}}
- // {{{ setOptions()
function getOptions()
{
return $this->_options;
}
- /**
- * For simpler unit-testing
- * @param PEAR_Config
- * @param int
- * @param string
- */
- function &getPackagefileObject(&$c, $d, $t = false)
- {
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'PEAR/PackageFile.php';
- }
- $a = &new PEAR_PackageFile($c, $d, $t);
- return $a;
- }
/**
* @param array output of {@link parsePackageName()}
@@ -41767,9 +41962,20 @@ class PEAR_Downloader extends PEAR_Common
}
return $info;
} elseif ($chan->supportsREST($this->config->get('preferred_mirror'))
- && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))
+ &&
+ (
+ ($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror')))
+ ||
+ ($base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror')))
+ )
) {
- $rest = &$this->config->getREST('1.0', $this->_options);
+ if ($base2) {
+ $base = $base2;
+ $rest = &$this->config->getREST('1.3', $this->_options);
+ } else {
+ $rest = &$this->config->getREST('1.0', $this->_options);
+ }
+
$url = $rest->getDepDownloadURL($base, $xsdversion, $dep, $parr,
$state, $version, $chan->getName());
if (PEAR::isError($url)) {
@@ -42405,7 +42611,7 @@ class PEAR_Downloader extends PEAR_Common
}
$request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.1/PHP/" . PHP_VERSION . "\r\n";
+ "User-Agent: PEAR/1.9.2/PHP/" . PHP_VERSION . "\r\n";
if (isset($this)) { // only pass in authentication for non-static calls
$username = $config->get('username', null, $channel);
@@ -42474,6 +42680,10 @@ class PEAR_Downloader extends PEAR_Common
}
$dest_file = $save_dir . DIRECTORY_SEPARATOR . $save_as;
+ if (is_link($dest_file)) {
+ return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $dest_file . ' as it is symlinked to ' . readlink($dest_file) . ' - Possible symlink attack');
+ }
+
if (!$wp = @fopen($dest_file, 'wb')) {
fclose($fp);
if ($callback) {
@@ -42525,8 +42735,7 @@ class PEAR_Downloader extends PEAR_Common
}
return $dest_file;
}
-}
-// }}}
+}
/**
* Error Stack Implementation
*
@@ -42551,7 +42760,7 @@ class PEAR_Downloader extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 2004-2008 Greg Beaver
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: ErrorStack.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: ErrorStack.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
@@ -42660,12 +42869,12 @@ define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
* $local_stack = new PEAR_ErrorStack('MyPackage');
* </code>
* @author Greg Beaver <cellog@php.net>
- * @version 1.9.1
+ * @version 1.9.2
* @package PEAR_ErrorStack
* @category Debugging
* @copyright 2004-2008 Greg Beaver
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: ErrorStack.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: ErrorStack.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR_ErrorStack
*/
class PEAR_ErrorStack {
@@ -43511,7 +43720,7 @@ class PEAR_ErrorStack {
$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
/**
* PEAR_Exception
@@ -43526,7 +43735,7 @@ $stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Exception.php 296939 2010-03-27 16:24:43Z dufuz $
+ * @version CVS: $Id: Exception.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.3
*/
@@ -43602,7 +43811,7 @@ $stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.3
*
@@ -43899,13 +44108,13 @@ class PEAR_Exception extends Exception
}
return $causeMsg . $this->getTraceAsString();
}
-}
+}
if ($skipmsg) {
$a = &new $ec($code, $mode, $options, $userinfo);
} else {
$a = &new $ec($message, $code, $mode, $options, $userinfo);
}
-?>
+?>
/**
* PEAR_Frontend, the singleton-based frontend for user input/output
*
@@ -43916,7 +44125,7 @@ if ($skipmsg) {
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Frontend.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Frontend.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -43946,7 +44155,7 @@ $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null;
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -44132,7 +44341,7 @@ class PEAR_Frontend extends PEAR
function userDialog($command, $prompts, $types = array(), $defaults = array())
{
}
-}
+}
/**
* PEAR_Installer
*
@@ -44146,7 +44355,7 @@ class PEAR_Frontend extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Installer.php 287446 2009-08-18 11:45:05Z dufuz $
+ * @version CVS: $Id: Installer.php 308698 2011-02-26 00:17:22Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -44170,7 +44379,7 @@ define('PEAR_INSTALLER_NOBINARY', -240);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -44888,11 +45097,9 @@ class PEAR_Installer extends PEAR_Downloader
function commitFileTransaction()
{
- $n = count($this->file_operations);
- $this->log(2, "about to commit $n file operations");
// {{{ first, check permissions and such manually
$errors = array();
- foreach ($this->file_operations as $tr) {
+ foreach ($this->file_operations as $key => $tr) {
list($type, $data) = $tr;
switch ($type) {
case 'rename':
@@ -44929,12 +45136,34 @@ class PEAR_Installer extends PEAR_Downloader
fclose($fp);
}
}
+
+ /* Verify we are not deleting a file owned by another package
+ * This can happen when a file moves from package A to B in
+ * an upgrade ala http://pear.php.net/17986
+ */
+ $info = array(
+ 'package' => strtolower($this->pkginfo->getName()),
+ 'channel' => strtolower($this->pkginfo->getChannel()),
+ );
+ $result = $this->_registry->checkFileMap($data[0], $info, '1.1');
+ if (is_array($result)) {
+ $res = array_diff($result, $info);
+ if (!empty($res)) {
+ $new = $this->_registry->getPackage($result[1], $result[0]);
+ $this->file_operations[$key] = false;
+ $this->log(3, "file $data[0] was scheduled for removal from {$this->pkginfo->getName()} but is owned by {$new->getChannel()}/{$new->getName()}, removal has been cancelled.");
+ }
+ }
}
break;
}
}
// }}}
+
+ $n = count($this->file_operations);
+ $this->log(2, "about to commit $n file operations for " . $this->pkginfo->getName());
+
$m = count($errors);
if ($m > 0) {
foreach ($errors as $error) {
@@ -45170,25 +45399,10 @@ class PEAR_Installer extends PEAR_Downloader
// }}}
// {{{ _parsePackageXml()
- function _parsePackageXml(&$descfile, &$tmpdir)
+ function _parsePackageXml(&$descfile)
{
- if (substr($descfile, -4) == '.xml') {
- $tmpdir = false;
- } else {
- // {{{ Decompress pack in tmp dir -------------------------------------
-
- // To allow relative package file names
- $descfile = realpath($descfile);
-
- if (PEAR::isError($tmpdir = System::mktemp('-d'))) {
- return $tmpdir;
- }
- $this->log(3, '+ tmp dir created at ' . $tmpdir);
- // }}}
- }
-
// Parse xml file -----------------------------------------------
- $pkg = new PEAR_PackageFile($this->config, $this->debug, $tmpdir);
+ $pkg = new PEAR_PackageFile($this->config, $this->debug);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING);
PEAR::staticPopErrorHandling();
@@ -45269,17 +45483,20 @@ class PEAR_Installer extends PEAR_Downloader
$pkg = $pkgfile->getPackageFile();
$pkgfile = $pkg->getArchiveFile();
$descfile = $pkg->getPackageFile();
- $tmpdir = dirname($descfile);
} else {
$descfile = $pkgfile;
- $tmpdir = '';
- $pkg = $this->_parsePackageXml($descfile, $tmpdir);
+ $pkg = $this->_parsePackageXml($descfile);
if (PEAR::isError($pkg)) {
return $pkg;
}
}
+ $tmpdir = dirname($descfile);
if (realpath($descfile) != realpath($pkgfile)) {
+ // Use the temp_dir since $descfile can contain the download dir path
+ $tmpdir = $this->config->get('temp_dir', null, 'pear.php.net');
+ $tmpdir = System::mktemp("-d -t $tmpdir");
+
$tar = new Archive_Tar($pkgfile);
if (!$tar->extract($tmpdir)) {
return $this->raiseError("unable to unpack $pkgfile");
@@ -45507,9 +45724,8 @@ class PEAR_Installer extends PEAR_Downloader
}
}
- $tmp_path = dirname($descfile);
if (substr($pkgfile, -4) != '.xml') {
- $tmp_path .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion();
+ $tmpdir .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion();
}
$this->configSet('default_channel', $channel);
@@ -45535,9 +45751,9 @@ class PEAR_Installer extends PEAR_Downloader
foreach ($filelist as $file => $atts) {
$this->expectError(PEAR_INSTALLER_FAILED);
if ($pkg->getPackagexmlVersion() == '1.0') {
- $res = $this->_installFile($file, $atts, $tmp_path, $options);
+ $res = $this->_installFile($file, $atts, $tmpdir, $options);
} else {
- $res = $this->_installFile2($pkg, $file, $atts, $tmp_path, $options);
+ $res = $this->_installFile2($pkg, $file, $atts, $tmpdir, $options);
}
$this->popExpect();
@@ -45954,7 +46170,7 @@ class PEAR_Installer extends PEAR_Downloader
}
// }}}
-}
+}
/**
* PEAR_PackageFile, package.xml parsing utility class
*
@@ -45965,7 +46181,7 @@ class PEAR_Installer extends PEAR_Downloader
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: PackageFile.php 286670 2009-08-02 14:16:06Z dufuz $
+ * @version CVS: $Id: PackageFile.php 308687 2011-02-25 23:14:27Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -45991,7 +46207,7 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -46002,11 +46218,7 @@ class PEAR_PackageFile
*/
var $_config;
var $_debug;
- /**
- * Temp directory for uncompressing tgz files.
- * @var string|false
- */
- var $_tmpdir;
+
var $_logger = false;
/**
* @var boolean
@@ -46014,17 +46226,23 @@ class PEAR_PackageFile
var $_rawReturn = false;
/**
+ * helper for extracting Archive_Tar errors
+ * @var array
+ * @access private
+ */
+ var $_extractErrors = array();
+
+ /**
*
* @param PEAR_Config $config
* @param ? $debug
* @param string @tmpdir Optional temporary directory for uncompressing
* files
*/
- function PEAR_PackageFile(&$config, $debug = false, $tmpdir = false)
+ function PEAR_PackageFile(&$config, $debug = false)
{
$this->_config = $config;
$this->_debug = $debug;
- $this->_tmpdir = $tmpdir;
}
/**
@@ -46305,20 +46523,17 @@ class PEAR_PackageFile
}
}
- if ($this->_tmpdir) {
- $tmpdir = $this->_tmpdir;
- } else {
- $tmpdir = System::mkTemp(array('-t', $this->_config->get('temp_dir'), '-d', 'pear'));
- if ($tmpdir === false) {
- $ret = PEAR::raiseError("there was a problem with getting the configured temp directory");
- return $ret;
- }
-
- PEAR_PackageFile::addTempFile($tmpdir);
+ $tmpdir = System::mktemp('-t ' . $this->_config->get('temp_dir') . ' -d pear');
+ if ($tmpdir === false) {
+ $ret = PEAR::raiseError("there was a problem with getting the configured temp directory");
+ return $ret;
}
+ PEAR_PackageFile::addTempFile($tmpdir);
+
$this->_extractErrors();
PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors'));
+
if (!$xml || !$tar->extractList(array($xml), $tmpdir)) {
$extra = implode("\n", $this->_extractErrors());
if ($extra) {
@@ -46337,13 +46552,6 @@ class PEAR_PackageFile
}
/**
- * helper for extracting Archive_Tar errors
- * @var array
- * @access private
- */
- var $_extractErrors = array();
-
- /**
* helper callback for extracting Archive_Tar errors
*
* @param PEAR_Error|null $err
@@ -46454,7 +46662,7 @@ class PEAR_PackageFile
$info = PEAR::raiseError("Cannot open '$info' for parsing");
return $info;
}
-}
+}
/**
* PEAR_Packager for generating releases
*
@@ -46467,7 +46675,7 @@ class PEAR_PackageFile
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Packager.php 286809 2009-08-04 15:10:26Z dufuz $
+ * @version CVS: $Id: Packager.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -46487,7 +46695,7 @@ require_once 'System.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -46654,7 +46862,7 @@ class PEAR_Packager extends PEAR_Common
return $dest_package;
}
-}
+}
/**
* PEAR_Registry
*
@@ -46667,7 +46875,7 @@ class PEAR_Packager extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Registry.php 287555 2009-08-21 21:27:27Z dufuz $
+ * @version CVS: $Id: Registry.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -46693,7 +46901,7 @@ define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -49048,7 +49256,7 @@ class PEAR_Registry extends PEAR
}
return $ret;
}
-}
+}
/**
* PEAR_REST
*
@@ -49059,7 +49267,7 @@ class PEAR_Registry extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: REST.php 296767 2010-03-25 00:58:33Z dufuz $
+ * @version CVS: $Id: REST.php 308687 2011-02-25 23:14:27Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -49078,7 +49286,7 @@ require_once 'PEAR/XMLParser.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -49150,7 +49358,10 @@ class PEAR_REST
$ret = $this->getCache($url);
if (!PEAR::isError($ret) && $trieddownload) {
// reset the age of the cache if the server says it was unmodified
- $this->saveCache($url, $ret, null, true, $cacheId);
+ $result = $this->saveCache($url, $ret, null, true, $cacheId);
+ if (PEAR::isError($result)) {
+ return PEAR::raiseErro($result->getMessage());
+ }
}
return $ret;
@@ -49167,7 +49378,11 @@ class PEAR_REST
}
if ($forcestring) {
- $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ if (PEAR::isError($result)) {
+ return PEAR::raiseErro($result->getMessage());
+ }
+
return $content;
}
@@ -49203,7 +49418,11 @@ class PEAR_REST
$content = $parser->getData();
}
- $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ if (PEAR::isError($result)) {
+ return PEAR::raiseErro($result->getMessage());
+ }
+
return $content;
}
@@ -49262,57 +49481,65 @@ class PEAR_REST
*/
function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null)
{
- $cachedir = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . md5($url);
- $cacheidfile = $cachedir . 'rest.cacheid';
- $cachefile = $cachedir . 'rest.cachefile';
+ $cache_dir = $this->config->get('cache_dir');
+ $d = $cache_dir . DIRECTORY_SEPARATOR . md5($url);
+ $cacheidfile = $d . 'rest.cacheid';
+ $cachefile = $d . 'rest.cachefile';
if ($cacheid === null && $nochange) {
$cacheid = unserialize(implode('', file($cacheidfile)));
}
- $fp = @fopen($cacheidfile, 'wb');
- if (!$fp) {
- $cache_dir = $this->config->get('cache_dir');
+ if (is_link($cacheidfile)) {
+ return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $cacheidfile . ' as it is symlinked to ' . readlink($cacheidfile) . ' - Possible symlink attack');
+ }
+
+ if (is_link($cachefile)) {
+ return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $cacheidfile . ' as it is symlinked to ' . readlink($cacheidfile) . ' - Possible symlink attack');
+ }
+
+ $cacheidfile_fp = @fopen($cacheidfile, 'wb');
+ if (!$cacheidfile_fp) {
if (is_dir($cache_dir)) {
- return false;
+ return PEAR::raiseError("The value of config option cache_dir ($cache_dir) is not a directory. ");
}
System::mkdir(array('-p', $cache_dir));
- $fp = @fopen($cacheidfile, 'wb');
- if (!$fp) {
- return false;
+ $cacheidfile_fp = @fopen($cacheidfile, 'wb');
+ if (!$cacheidfile_fp) {
+ return PEAR::raiseError("Could not open $cacheidfile for writing.");
}
}
if ($nochange) {
- fwrite($fp, serialize(array(
+ fwrite($cacheidfile_fp, serialize(array(
'age' => time(),
'lastChange' => $cacheid['lastChange'],
))
);
- fclose($fp);
+ fclose($cacheidfile_fp);
return true;
}
- fwrite($fp, serialize(array(
+ fwrite($cacheidfile_fp, serialize(array(
'age' => time(),
'lastChange' => $lastmodified,
))
);
+ fclose($cacheidfile_fp);
- fclose($fp);
- $fp = @fopen($cachefile, 'wb');
- if (!$fp) {
+ $cachefile_fp = @fopen($cachefile, 'wb');
+ if (!$cachefile_fp) {
if (file_exists($cacheidfile)) {
@unlink($cacheidfile);
}
- return false;
+ return PEAR::raiseError("Could not open $cacheidfile for writing.");
}
- fwrite($fp, serialize($contents));
- fclose($fp);
+ fwrite($cachefile_fp, serialize($contents));
+ fclose($cachefile_fp);
return true;
}
@@ -49398,7 +49625,7 @@ class PEAR_REST
}
$request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.1/PHP/" . PHP_VERSION . "\r\n";
+ "User-Agent: PEAR/1.9.2/PHP/" . PHP_VERSION . "\r\n";
$username = $this->config->get('username', null, $channel);
$password = $this->config->get('password', null, $channel);
@@ -49495,7 +49722,7 @@ class PEAR_REST
return $data;
}
-}
+}
/**
* PEAR_RunTest
*
@@ -49507,7 +49734,7 @@ class PEAR_REST
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: RunTest.php 297621 2010-04-07 15:09:33Z sebastian $
+ * @version CVS: $Id: RunTest.php 308689 2011-02-25 23:20:24Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.3
*/
@@ -49535,7 +49762,7 @@ putenv("PHP_PEAR_RUNTESTS=1");
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.3
*/
@@ -49779,7 +50006,7 @@ class PEAR_RunTest
if (empty($this->_options['cgi'])) {
// try to see if php-cgi is in the path
$res = $this->system_with_timeout('php-cgi -v');
- if (false !== $res && !(is_array($res) && $res === array(127, ''))) {
+ if (false !== $res && !(is_array($res) && in_array($res[0], array(-1, 127)))) {
$this->_options['cgi'] = 'php-cgi';
}
}
@@ -49882,7 +50109,7 @@ class PEAR_RunTest
$text .= "\n" . 'xdebug_stop_code_coverage();' .
"\n" . '} // end coverage_shutdown()' .
"\n" . 'register_shutdown_function("coverage_shutdown");';
- $text .= "\n" . 'xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);' . "\n?>";
+ $text .= "\n" . 'xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);' . "\n";
// Workaround for http://pear.php.net/bugs/bug.php?id=17292
$lines = explode("\n", $section_text['FILE']);
@@ -49896,14 +50123,14 @@ class PEAR_RunTest
unset($lines[$i]);
}
- if (substr($lines[$i], 0, 9) == 'namespace') {
+ if (isset($lines[$i]) && substr($lines[$i], 0, 9) == 'namespace') {
$namespace = $lines[$i] . "\n";
unset($lines[$i]);
break;
}
}
- $this->save_text($temp_file, "<?php\n" . $namespace . join("\n", $lines));
+ $this->save_text($temp_file, "<?php\n" . $namespace . "\n" . $text . "\n" . implode("\n", $lines));
} else {
$this->save_text($temp_file, $section_text['FILE']);
}
@@ -50457,7 +50684,7 @@ $text
}
}
}
-
+
/**
* PEAR_Validate
*
@@ -50468,7 +50695,7 @@ $text
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Validate.php 276383 2009-02-24 23:39:37Z dufuz $
+ * @version CVS: $Id: Validate.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -50491,7 +50718,7 @@ require_once 'PEAR/Validator/PECL.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -51085,7 +51312,7 @@ class PEAR_Validate
{
return true;
}
-}
+}
/**
* PEAR_XMLParser
*
@@ -51097,7 +51324,7 @@ class PEAR_Validate
* @author Stephan Schmidt (original XML_Unserializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id: XMLParser.php 282970 2009-06-28 23:10:07Z dufuz $
+ * @version CVS: $Id: XMLParser.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -51110,7 +51337,7 @@ class PEAR_Validate
* @author Stephan Schmidt (original XML_Unserializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -51337,7 +51564,7 @@ class PEAR_XMLParser
{
$this->_dataStack[$this->_depth] .= $cdata;
}
-}
+}
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -51447,7 +51674,7 @@ GOTO END
:RUN
"%PHP_PEAR_PHP_BIN%" -C -d output_buffering=1 -d safe_mode=0 -d open_basedir="" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d register_argc_argv="On" -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -51561,7 +51788,7 @@ GOTO END
:RUN
"%PHP_PEAR_PHP_BIN%" -C -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d open_basedir="" -d output_buffering=1 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
REM ----------------------------------------------------------------------
REM PHP version 5
@@ -51675,7 +51902,7 @@ GOTO END
:RUN
"%PHP_PEAR_PHP_BIN%" -C -n -d output_buffering=1 -d safe_mode=0 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -d register_argc_argv="On" -d variables_order=EGPCS -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
-@ECHO ON
+@ECHO ON
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -51703,7 +51930,7 @@ else
fi
exec $PHP -C -q $INCARG -d output_buffering=1 -d variables_order=EGPCS -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
+
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -51731,7 +51958,7 @@ else
fi
exec $PHP -d memory_limit="-1" -C -q $INCARG -d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d variables_order=EGPCS -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
+
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
@@ -51759,7 +51986,7 @@ else
fi
exec $PHP -C -n -q $INCARG -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
-
+
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -51773,7 +52000,7 @@ exec $PHP -C -n -q $INCARG -d output_buffering=1 -d variables_order=EGPCS -d saf
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: pearcmd.php 296932 2010-03-27 15:13:06Z dufuz $
+ * @version CVS: $Id: pearcmd.php 308720 2011-02-27 13:56:15Z dufuz $
* @link http://pear.php.net/package/PEAR
*/
@@ -52104,6 +52331,10 @@ function usage($error = null, $helpsubject = null)
}
fputs($stdout, "$put\n");
fclose($stdout);
+
+ if ($error === null) {
+ exit(0);
+ }
exit(1);
}
@@ -52202,7 +52433,7 @@ function error_handler($errno, $errmsg, $file, $line, $vars) {
* mode: php
* End:
*/
-// vim600:syn=php
+// vim600:syn=php
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -52216,7 +52447,7 @@ function error_handler($errno, $errmsg, $file, $line, $vars) {
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: peclcmd.php 276392 2009-02-25 00:06:23Z dufuz $
+ * @version CVS: $Id: peclcmd.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
*/
@@ -52243,7 +52474,7 @@ require_once 'pearcmd.php';
// vim600:syn=php
?>
-
+
Stig Bakken <ssb@php.net>,
Gregory Beaver <cellog@php.net>,
Helgi Þormar Þorbjörnsson <helgi@php.net>,
@@ -52270,7 +52501,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
=========================
Installing the PEAR Installer.
@@ -52323,7 +52554,7 @@ related issues.
Happy PHPing, we hope PEAR will be a great tool for your development work!
-$Id: INSTALL 289056 2009-10-01 16:50:43Z ashnazg $
+$Id: INSTALL 307683 2011-01-23 21:56:12Z dufuz $
$Id: package.dtd,v 1.38 2005-11-12 02:23:07 cellog Exp $
This is the PEAR package description, version 1.0.
@@ -52426,7 +52657,7 @@ $Id: INSTALL 289056 2009-10-01 16:50:43Z ashnazg $
to CDATA #REQUIRED>
-
+
/**
* This is only meant for PHP 5 to get rid of certain strict warning
* that doesn't get hidden since it's in the shutdown function
@@ -52458,7 +52689,7 @@ class PEAR5
return $properties[$class][$var];
}
-}
+}
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -52474,7 +52705,7 @@ class PEAR5
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2010 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: PEAR.php 299159 2010-05-08 22:32:52Z dufuz $
+ * @version CVS: $Id: PEAR.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -52538,7 +52769,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array();
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @see PEAR_Error
* @since Class available since PHP 4.0.2
@@ -53248,7 +53479,7 @@ function _PEAR_call_destructors()
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.9.2
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
* @see PEAR::raiseError(), PEAR::throwError()
* @since Class available since PHP 4.0.2
@@ -53521,7 +53752,7 @@ class PEAR_Error
* c-basic-offset: 4
* End:
*/
-
+
=========================
What is the PEAR Installer? What is PEAR?
@@ -53552,7 +53783,7 @@ prior to use.
Happy PHPing, we hope PEAR will be a great tool for your development work!
-$Id: README 220345 2006-09-22 03:31:36Z cellog $
+$Id: README 307683 2011-01-23 21:56:12Z dufuz $
/**
* File/Directory manipulation
*
@@ -53563,7 +53794,7 @@ $Id: README 220345 2006-09-22 03:31:36Z cellog $
* @author Tomas V.V.Cox <cox@idecnet.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: System.php 276386 2009-02-24 23:52:56Z dufuz $
+ * @version CVS: $Id: System.php 307683 2011-01-23 21:56:12Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -53605,7 +53836,7 @@ $GLOBALS['_System_temp_files'] = array();
* @author Tomas V.V. Cox <cox@idecnet.com>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
-* @version Release: 1.9.1
+* @version Release: 1.9.2
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
* @static
@@ -54172,7 +54403,7 @@ class System
}
return $files;
}
-}
+}
Name: @rpm_package@
Version: @version@
Release: 1
@@ -54244,9 +54475,9 @@ cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
%defattr(-,root,root)
%doc @doc_files@
/
-
+
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0">
-<package version="1.0" packagerversion="1.9.1">
+<package version="1.0" packagerversion="1.9.2">
<name>PEAR</name>
<summary>PEAR Base System</summary>
<description>The PEAR package contains:
@@ -54332,22 +54563,29 @@ cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
</maintainer>
</maintainers>
<release>
- <version>1.9.1</version>
- <date>2010-05-26</date>
+ <version>1.9.2</version>
+ <date>2011-02-28</date>
<license>New BSD License</license>
<state>stable</state>
- <notes>* svntag improvements, tag package files passed into the command and better directory checks [dufuz]
-* rely on Structures_Graph minimum version instead of recommended version [saltybeagle]
-* Fix Bug #12613: running go-pear.phar from C:\ fails [dufuz]
-* Fix Bug #14841: Installing pear into directory with space fails [dufuz]
-* Fix Bug #16644: pear.bat returns syntax error when parenthesis are in install path. [dufuz] [patch by bwaters (Bryan Waters)]
-* Fix Bug #16767: Use of Depreciated HTML Attributes in the Exception class [dufuz] [patch by fuhrysteve (Stephen J. Fuhry)]
-* Fix Bug #16864: &quot;pear list-upgrades -i&quot; issues E_WARNINGS [dufuz] [patch by rquadling (Richard Quadling)]
-* Fix Bug #17220: command `pear help` outputs to stderr instead of stdout [dufuz]
-* Fix Bug #17234: channel-discover adds port to HTTP Host header [dufuz]
-* Fix Bug #17292: Code Coverage in PEAR_RunTest does not work with namespaces [sebastian]
-* Fix Bug #17359: loadExtension() fails over missing dl() when used in multithread env [dufuz]
-* Fix Bug #17378: pear info $package fails if directory with that name exists [dufuz]
+ <notes>Important! This is a security fix release. The advisory can be found at
+http://pear.php.net/advisory-20110228.txt
+
+ Bugs:
+ * Fixed Bug #17463: Regression: On Windows, svntag [patch by doconnor]
+ * Fixed Bug #17641: pecl-list doesn&apos;t sort packages by name [dufuz]
+ * Fixed Bug #17781: invalid argument warning on foreach due to an empty optional dependencie [dufuz]
+ * Fixed Bug #17801: PEAR run-tests wrongly detects php-cgi [patch by David Jean Louis (izi)]
+ * Fixed Bug #17839: pear svntag does not tag package.xml file [dufuz]
+ * Fixed Bug #17986: PEAR Installer cannot handle files moved between packages [dufuz]
+ * Fixed Bug #17997: Strange output if directories are not writeable [dufuz]
+ * Fixed Bug #18001: PEAR/RunTest coverage fails [dufuz]
+ * Fixed Bug #18056 [SECURITY]: Symlink attack in PEAR install [dufuz]
+ * Fixed Bug #18218: &quot;pear package&quot; does not allow the use of late static binding [dufuz and Christer Edvartsen]
+ * Fixed Bug #18238: Wrong return code from &quot;pear help&quot; [till]
+ * Fixed Bug #18308: Broken error message about missing channel validator [yunosh]
+
+ This feature is implemented as a result of #18056
+ * Implemented Request #16648: Use TMPDIR for builds instead of /var/tmp [dufuz]
</notes>
<deps>
<dep type="php" rel="ge" version="4.4.0"/>
@@ -54878,15 +55116,52 @@ Alpha1 Release Notes:
</release>
<release>
<version>1.9.1</version>
- <date>2009-09-XX</date>
+ <date>2010-05-26</date>
<license>New BSD License</license>
<state>stable</state>
<notes>* svntag improvements, tag package files passed into the command and better directory checks [dufuz]
+* rely on Structures_Graph minimum version instead of recommended version [saltybeagle]
+* Fix Bug #12613: running go-pear.phar from C:\ fails [dufuz]
+* Fix Bug #14841: Installing pear into directory with space fails [dufuz]
+* Fix Bug #16644: pear.bat returns syntax error when parenthesis are in install path. [dufuz] [patch by bwaters (Bryan Waters)]
+* Fix Bug #16767: Use of Depreciated HTML Attributes in the Exception class [dufuz] [patch by fuhrysteve (Stephen J. Fuhry)]
+* Fix Bug #16864: &quot;pear list-upgrades -i&quot; issues E_WARNINGS [dufuz] [patch by rquadling (Richard Quadling)]
+* Fix Bug #17220: command `pear help` outputs to stderr instead of stdout [dufuz]
+* Fix Bug #17234: channel-discover adds port to HTTP Host header [dufuz]
+* Fix Bug #17292: Code Coverage in PEAR_RunTest does not work with namespaces [sebastian]
+* Fix Bug #17359: loadExtension() fails over missing dl() when used in multithread env [dufuz]
+* Fix Bug #17378: pear info $package fails if directory with that name exists [dufuz]
+ </notes>
+ </release>
+ <release>
+ <version>1.9.2</version>
+ <date>2011-02-28</date>
+ <license>New BSD License</license>
+ <state>stable</state>
+ <notes>Important! This is a security fix release. The advisory can be found at
+http://pear.php.net/advisory-20110228.txt
+
+ Bugs:
+ * Fixed Bug #17463: Regression: On Windows, svntag [patch by doconnor]
+ * Fixed Bug #17641: pecl-list doesn&apos;t sort packages by name [dufuz]
+ * Fixed Bug #17781: invalid argument warning on foreach due to an empty optional dependencie [dufuz]
+ * Fixed Bug #17801: PEAR run-tests wrongly detects php-cgi [patch by David Jean Louis (izi)]
+ * Fixed Bug #17839: pear svntag does not tag package.xml file [dufuz]
+ * Fixed Bug #17986: PEAR Installer cannot handle files moved between packages [dufuz]
+ * Fixed Bug #17997: Strange output if directories are not writeable [dufuz]
+ * Fixed Bug #18001: PEAR/RunTest coverage fails [dufuz]
+ * Fixed Bug #18056 [SECURITY]: Symlink attack in PEAR install [dufuz]
+ * Fixed Bug #18218: &quot;pear package&quot; does not allow the use of late static binding [dufuz and Christer Edvartsen]
+ * Fixed Bug #18238: Wrong return code from &quot;pear help&quot; [till]
+ * Fixed Bug #18308: Broken error message about missing channel validator [yunosh]
+
+ This feature is implemented as a result of #18056
+ * Implemented Request #16648: Use TMPDIR for builds instead of /var/tmp [dufuz]
</notes>
</release>
</changelog>
</package>
-
+
/**
* PEAR, the PHP Extension and Application Repository
*
@@ -54966,7 +55241,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array();
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @see PEAR_Error
* @since Class available since PHP 4.0.2
@@ -55676,7 +55951,7 @@ function _PEAR_call_destructors()
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
* @see PEAR::raiseError(), PEAR::throwError()
* @since Class available since PHP 4.0.2
@@ -56097,7 +56372,7 @@ $GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server');
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -57535,7 +57810,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -57670,7 +57945,7 @@ $GLOBALS['_PEAR_Command_objects'] = array();
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -58018,7 +58293,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -58271,7 +58546,7 @@ class PEAR_Command_Common extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Install.php 287477 2009-08-19 14:19:43Z dufuz $
+ * @version CVS: $Id: Install.php 308688 2011-02-25 23:18:06Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -58291,7 +58566,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Command/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -58991,7 +59266,8 @@ Run post-installation scripts in package <package>, if any exist.
if ($param->getPackageType() == 'extsrc' ||
$param->getPackageType() == 'extbin' ||
$param->getPackageType() == 'zendextsrc' ||
- $param->getPackageType() == 'zendextbin') {
+ $param->getPackageType() == 'zendextbin'
+ ) {
$pkg = &$param->getPackageFile();
if ($instbin = $pkg->getInstalledBinary()) {
$instpkg = &$instreg->getPackage($instbin, $pkg->getChannel());
@@ -59002,7 +59278,8 @@ Run post-installation scripts in package <package>, if any exist.
foreach ($instpkg->getFilelist() as $name => $atts) {
$pinfo = pathinfo($atts['installed_as']);
if (!isset($pinfo['extension']) ||
- in_array($pinfo['extension'], array('c', 'h'))) {
+ in_array($pinfo['extension'], array('c', 'h'))
+ ) {
continue; // make sure we don't match php_blah.h
}
@@ -59919,7 +60196,7 @@ $GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'p
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @deprecated This class will disappear, and its components will be spread
@@ -60883,7 +61160,7 @@ if (getenv('PHP_PEAR_SIG_KEYDIR')) {
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -62765,7 +63042,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -63275,7 +63552,7 @@ class PEAR_Dependency2
*/
function getPEARVersion()
{
- return '1.9.1';
+ return '1.10.0beta1';
}
function validatePearinstallerDependency($dep)
@@ -64121,7 +64398,7 @@ $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array();
* @author Tomas V.V.Cox <cox@idec.net.com>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -64871,7 +65148,7 @@ class PEAR_DependencyDB
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Downloader.php 296767 2010-03-25 00:58:33Z dufuz $
+ * @version CVS: $Id: Downloader.php 308688 2011-02-25 23:18:06Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -64898,7 +65175,7 @@ define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2);
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.3.0
*/
@@ -65048,7 +65325,8 @@ class PEAR_Downloader extends PEAR_Common
require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
}
- $tmp = System::mktemp(array('-d'));
+ $tmpdir = $this->config->get('temp_dir');
+ $tmp = System::mktemp("-d -t $tmpdir");
$a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false);
PEAR::popErrorHandling();
if (PEAR::isError($a)) {
@@ -65352,14 +65630,13 @@ class PEAR_Downloader extends PEAR_Common
*/
function analyzeDependencies(&$params, $force = false)
{
- $hasfailed = $failed = false;
if (isset($this->_options['downloadonly'])) {
return;
}
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$redo = true;
- $reset = false;
+ $reset = $hasfailed = $failed = false;
while ($redo) {
$redo = false;
foreach ($params as $i => $param) {
@@ -65412,7 +65689,7 @@ class PEAR_Downloader extends PEAR_Common
}
$failed = false;
- if (isset($deps['required'])) {
+ if (isset($deps['required']) && is_array($deps['required'])) {
foreach ($deps['required'] as $type => $dep) {
// note: Dependency2 will never return a PEAR_Error if ignore-errors
// is specified, so soft is needed to turn off logging
@@ -65446,7 +65723,7 @@ class PEAR_Downloader extends PEAR_Common
}
}
- if (isset($deps['optional'])) {
+ if (isset($deps['optional']) && is_array($deps['optional'])) {
foreach ($deps['optional'] as $type => $dep) {
if (!isset($dep[0])) {
if (PEAR::isError($e =
@@ -65557,6 +65834,7 @@ class PEAR_Downloader extends PEAR_Common
}
}
}
+
PEAR::staticPopErrorHandling();
if ($hasfailed && (isset($this->_options['ignore-errors']) ||
isset($this->_options['nodeps']))) {
@@ -65577,6 +65855,7 @@ class PEAR_Downloader extends PEAR_Common
if (isset($this->_downloadDir)) {
return $this->_downloadDir;
}
+
$downloaddir = $this->config->get('download_dir');
if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) {
if (is_dir($downloaddir) && !is_writable($downloaddir)) {
@@ -65584,14 +65863,17 @@ class PEAR_Downloader extends PEAR_Common
'" is not writeable. Change download_dir config variable to ' .
'a writeable dir to avoid this warning');
}
+
if (!class_exists('System')) {
require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
}
+
if (PEAR::isError($downloaddir = System::mktemp('-d'))) {
return $downloaddir;
}
$this->log(3, '+ tmp dir created at ' . $downloaddir);
}
+
if (!is_writable($downloaddir)) {
if (PEAR::isError(System::mkdir(array('-p', $downloaddir))) ||
!is_writable($downloaddir)) {
@@ -65600,6 +65882,7 @@ class PEAR_Downloader extends PEAR_Common
'a writeable dir');
}
}
+
return $this->_downloadDir = $downloaddir;
}
@@ -65630,27 +65913,11 @@ class PEAR_Downloader extends PEAR_Common
$this->_options = $options;
}
- // }}}
- // {{{ setOptions()
function getOptions()
{
return $this->_options;
}
- /**
- * For simpler unit-testing
- * @param PEAR_Config
- * @param int
- * @param string
- */
- function &getPackagefileObject(&$c, $d, $t = false)
- {
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';
- }
- $a = &new PEAR_PackageFile($c, $d, $t);
- return $a;
- }
/**
* @param array output of {@link parsePackageName()}
@@ -65859,9 +66126,20 @@ class PEAR_Downloader extends PEAR_Common
}
return $info;
} elseif ($chan->supportsREST($this->config->get('preferred_mirror'))
- && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))
+ &&
+ (
+ ($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror')))
+ ||
+ ($base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror')))
+ )
) {
- $rest = &$this->config->getREST('1.0', $this->_options);
+ if ($base2) {
+ $base = $base2;
+ $rest = &$this->config->getREST('1.3', $this->_options);
+ } else {
+ $rest = &$this->config->getREST('1.0', $this->_options);
+ }
+
$url = $rest->getDepDownloadURL($base, $xsdversion, $dep, $parr,
$state, $version, $chan->getName());
if (PEAR::isError($url)) {
@@ -66497,7 +66775,7 @@ class PEAR_Downloader extends PEAR_Common
}
$request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.1/PHP/" . PHP_VERSION . "\r\n";
+ "User-Agent: PEAR/1.10.0beta1/PHP/" . PHP_VERSION . "\r\n";
if (isset($this)) { // only pass in authentication for non-static calls
$username = $config->get('username', null, $channel);
@@ -66566,6 +66844,10 @@ class PEAR_Downloader extends PEAR_Common
}
$dest_file = $save_dir . DIRECTORY_SEPARATOR . $save_as;
+ if (is_link($dest_file)) {
+ return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $dest_file . ' as it is symlinked to ' . readlink($dest_file) . ' - Possible symlink attack');
+ }
+
if (!$wp = @fopen($dest_file, 'wb')) {
fclose($fp);
if ($callback) {
@@ -66617,8 +66899,7 @@ class PEAR_Downloader extends PEAR_Common
}
return $dest_file;
}
-}
-// }}}<?php
+}<?php
/**
* PEAR_Downloader_Package
*
@@ -66629,7 +66910,7 @@ class PEAR_Downloader extends PEAR_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Package.php 287560 2009-08-21 22:36:18Z dufuz $
+ * @version CVS: $Id: Package.php 308688 2011-02-25 23:18:06Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -66670,7 +66951,7 @@ define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -67996,6 +68277,8 @@ class PEAR_Downloader_Package
continue;
}
+ // FIXME do symlink check
+
fwrite($fp, $filecontents, strlen($filecontents));
fclose($fp);
if ($s = $params[$i]->explicitState()) {
@@ -68117,13 +68400,12 @@ class PEAR_Downloader_Package
* @param int
* @param string
*/
- function &getPackagefileObject(&$c, $d, $t = false)
+ function &getPackagefileObject(&$c, $d)
{
- $a = &new PEAR_PackageFile($c, $d, $t);
+ $a = &new PEAR_PackageFile($c, $d);
return $a;
}
-
/**
* This will retrieve from a local file if possible, and parse out
* a group name as well. The original parameter will be modified to reflect this.
@@ -68147,16 +68429,7 @@ class PEAR_Downloader_Package
if (@is_file($param)) {
$this->_type = 'local';
$options = $this->_downloader->getOptions();
- if (isset($options['downloadonly'])) {
- $pkg = &$this->getPackagefileObject($this->_config,
- $this->_downloader->_debug);
- } else {
- if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) {
- return $dir;
- }
- $pkg = &$this->getPackagefileObject($this->_config,
- $this->_downloader->_debug, $dir);
- }
+ $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->_debug);
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING);
PEAR::popErrorHandling();
@@ -68228,15 +68501,7 @@ class PEAR_Downloader_Package
}
// whew, download worked!
- if (isset($options['downloadonly'])) {
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug);
- } else {
- $dir = $this->_downloader->getDownloadDir();
- if (PEAR::isError($dir)) {
- return $dir;
- }
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug, $dir);
- }
+ $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug);
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$pf = &$pkg->fromAnyFile($file, PEAR_VALIDATE_INSTALLING);
@@ -68755,7 +69020,7 @@ define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
* $local_stack = new PEAR_ErrorStack('MyPackage');
* </code>
* @author Greg Beaver <cellog@php.net>
- * @version 1.9.1
+ * @version 1.10.0beta1
* @package PEAR_ErrorStack
* @category Debugging
* @copyright 2004-2008 Greg Beaver
@@ -69607,6 +69872,394 @@ $stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
?>
<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
+/**
+ * PEAR_Exception
+ *
+ * PHP versions 4 and 5
+ *
+ * @category pear
+ * @package PEAR
+ * @author Tomas V. V. Cox <cox@idecnet.com>
+ * @author Hans Lellelid <hans@velum.net>
+ * @author Bertrand Mansion <bmansion@mamasam.com>
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version CVS: $Id: Exception.php 308688 2011-02-25 23:18:06Z dufuz $
+ * @link http://pear.php.net/package/PEAR
+ * @since File available since Release 1.3.3
+ */
+
+
+/**
+ * Base PEAR_Exception Class
+ *
+ * 1) Features:
+ *
+ * - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception))
+ * - Definable triggers, shot when exceptions occur
+ * - Pretty and informative error messages
+ * - Added more context info available (like class, method or cause)
+ * - cause can be a PEAR_Exception or an array of mixed
+ * PEAR_Exceptions/PEAR_ErrorStack warnings
+ * - callbacks for specific exception classes and their children
+ *
+ * 2) Ideas:
+ *
+ * - Maybe a way to define a 'template' for the output
+ *
+ * 3) Inherited properties from PHP Exception Class:
+ *
+ * protected $message
+ * protected $code
+ * protected $line
+ * protected $file
+ * private $trace
+ *
+ * 4) Inherited methods from PHP Exception Class:
+ *
+ * __clone
+ * __construct
+ * getMessage
+ * getCode
+ * getFile
+ * getLine
+ * getTraceSafe
+ * getTraceSafeAsString
+ * __toString
+ *
+ * 5) Usage example
+ *
+ * <code>
+ * require_once 'PEAR/Exception.php';
+ *
+ * class Test {
+ * function foo() {
+ * throw new PEAR_Exception('Error Message', ERROR_CODE);
+ * }
+ * }
+ *
+ * function myLogger($pear_exception) {
+ * echo $pear_exception->getMessage();
+ * }
+ * // each time a exception is thrown the 'myLogger' will be called
+ * // (its use is completely optional)
+ * PEAR_Exception::addObserver('myLogger');
+ * $test = new Test;
+ * try {
+ * $test->foo();
+ * } catch (PEAR_Exception $e) {
+ * print $e;
+ * }
+ * </code>
+ *
+ * @category pear
+ * @package PEAR_Exception
+ * @author Tomas V.V.Cox <cox@idecnet.com>
+ * @author Hans Lellelid <hans@velum.net>
+ * @author Bertrand Mansion <bmansion@mamasam.com>
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright 1997-2009 The Authors
+ * @license http://opensource.org/licenses/bsd-license.php New BSD License
+ * @version Release: 1.10.0beta1
+ * @link http://pear.php.net/package/PEAR_Exception
+ * @since Class available since Release 1.0.0
+ *
+ */
+class PEAR_Exception extends Exception
+{
+ const OBSERVER_PRINT = -2;
+ const OBSERVER_TRIGGER = -4;
+ const OBSERVER_DIE = -8;
+ protected $cause;
+ private static $_observers = array();
+ private static $_uniqueid = 0;
+ private $_trace;
+
+ /**
+ * Supported signatures:
+ * - PEAR_Exception(string $message);
+ * - PEAR_Exception(string $message, int $code);
+ * - PEAR_Exception(string $message, Exception $cause);
+ * - PEAR_Exception(string $message, Exception $cause, int $code);
+ * - PEAR_Exception(string $message, PEAR_Error $cause);
+ * - PEAR_Exception(string $message, PEAR_Error $cause, int $code);
+ * - PEAR_Exception(string $message, array $causes);
+ * - PEAR_Exception(string $message, array $causes, int $code);
+ * @param string exception message
+ * @param int|Exception|PEAR_Error|array|null exception cause
+ * @param int|null exception code or null
+ */
+ public function __construct($message, $p2 = null, $p3 = null)
+ {
+ if (is_int($p2)) {
+ $code = $p2;
+ $this->cause = null;
+ } elseif (is_object($p2) || is_array($p2)) {
+ // using is_object allows both Exception and PEAR_Error
+ if (is_object($p2) && !($p2 instanceof Exception)) {
+ if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) {
+ throw new PEAR_Exception('exception cause must be Exception, ' .
+ 'array, or PEAR_Error');
+ }
+ }
+ $code = $p3;
+ if (is_array($p2) && isset($p2['message'])) {
+ // fix potential problem of passing in a single warning
+ $p2 = array($p2);
+ }
+ $this->cause = $p2;
+ } else {
+ $code = null;
+ $this->cause = null;
+ }
+ parent::__construct($message, $code);
+ $this->signal();
+ }
+
+ /**
+ * @param mixed $callback - A valid php callback, see php func is_callable()
+ * - A PEAR_Exception::OBSERVER_* constant
+ * - An array(const PEAR_Exception::OBSERVER_*,
+ * mixed $options)
+ * @param string $label The name of the observer. Use this if you want
+ * to remove it later with removeObserver()
+ */
+ public static function addObserver($callback, $label = 'default')
+ {
+ self::$_observers[$label] = $callback;
+ }
+
+ public static function removeObserver($label = 'default')
+ {
+ unset(self::$_observers[$label]);
+ }
+
+ /**
+ * @return int unique identifier for an observer
+ */
+ public static function getUniqueId()
+ {
+ return self::$_uniqueid++;
+ }
+
+ private function signal()
+ {
+ foreach (self::$_observers as $func) {
+ if (is_callable($func)) {
+ call_user_func($func, $this);
+ continue;
+ }
+ settype($func, 'array');
+ switch ($func[0]) {
+ case self::OBSERVER_PRINT :
+ $f = (isset($func[1])) ? $func[1] : '%s';
+ printf($f, $this->getMessage());
+ break;
+ case self::OBSERVER_TRIGGER :
+ $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE;
+ trigger_error($this->getMessage(), $f);
+ break;
+ case self::OBSERVER_DIE :
+ $f = (isset($func[1])) ? $func[1] : '%s';
+ die(printf($f, $this->getMessage()));
+ break;
+ default:
+ trigger_error('invalid observer type', E_USER_WARNING);
+ }
+ }
+ }
+
+ /**
+ * Return specific error information that can be used for more detailed
+ * error messages or translation.
+ *
+ * This method may be overridden in child exception classes in order
+ * to add functionality not present in PEAR_Exception and is a placeholder
+ * to define API
+ *
+ * The returned array must be an associative array of parameter => value like so:
+ * <pre>
+ * array('name' => $name, 'context' => array(...))
+ * </pre>
+ * @return array
+ */
+ public function getErrorData()
+ {
+ return array();
+ }
+
+ /**
+ * Returns the exception that caused this exception to be thrown
+ * @access public
+ * @return Exception|array The context of the exception
+ */
+ public function getCause()
+ {
+ return $this->cause;
+ }
+
+ /**
+ * Function must be public to call on caused exceptions
+ * @param array
+ */
+ public function getCauseMessage(&$causes)
+ {
+ $trace = $this->getTraceSafe();
+ $cause = array('class' => get_class($this),
+ 'message' => $this->message,
+ 'file' => 'unknown',
+ 'line' => 'unknown');
+ if (isset($trace[0])) {
+ if (isset($trace[0]['file'])) {
+ $cause['file'] = $trace[0]['file'];
+ $cause['line'] = $trace[0]['line'];
+ }
+ }
+ $causes[] = $cause;
+ if ($this->cause instanceof PEAR_Exception) {
+ $this->cause->getCauseMessage($causes);
+ } elseif ($this->cause instanceof Exception) {
+ $causes[] = array('class' => get_class($this->cause),
+ 'message' => $this->cause->getMessage(),
+ 'file' => $this->cause->getFile(),
+ 'line' => $this->cause->getLine());
+ } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) {
+ $causes[] = array('class' => get_class($this->cause),
+ 'message' => $this->cause->getMessage(),
+ 'file' => 'unknown',
+ 'line' => 'unknown');
+ } elseif (is_array($this->cause)) {
+ foreach ($this->cause as $cause) {
+ if ($cause instanceof PEAR_Exception) {
+ $cause->getCauseMessage($causes);
+ } elseif ($cause instanceof Exception) {
+ $causes[] = array('class' => get_class($cause),
+ 'message' => $cause->getMessage(),
+ 'file' => $cause->getFile(),
+ 'line' => $cause->getLine());
+ } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) {
+ $causes[] = array('class' => get_class($cause),
+ 'message' => $cause->getMessage(),
+ 'file' => 'unknown',
+ 'line' => 'unknown');
+ } elseif (is_array($cause) && isset($cause['message'])) {
+ // PEAR_ErrorStack warning
+ $causes[] = array(
+ 'class' => $cause['package'],
+ 'message' => $cause['message'],
+ 'file' => isset($cause['context']['file']) ?
+ $cause['context']['file'] :
+ 'unknown',
+ 'line' => isset($cause['context']['line']) ?
+ $cause['context']['line'] :
+ 'unknown',
+ );
+ }
+ }
+ }
+ }
+
+ public function getTraceSafe()
+ {
+ if (!isset($this->_trace)) {
+ $this->_trace = $this->getTrace();
+ if (empty($this->_trace)) {
+ $backtrace = debug_backtrace();
+ $this->_trace = array($backtrace[count($backtrace)-1]);
+ }
+ }
+ return $this->_trace;
+ }
+
+ public function getErrorClass()
+ {
+ $trace = $this->getTraceSafe();
+ return $trace[0]['class'];
+ }
+
+ public function getErrorMethod()
+ {
+ $trace = $this->getTraceSafe();
+ return $trace[0]['function'];
+ }
+
+ public function __toString()
+ {
+ if (isset($_SERVER['REQUEST_URI'])) {
+ return $this->toHtml();
+ }
+ return $this->toText();
+ }
+
+ public function toHtml()
+ {
+ $trace = $this->getTraceSafe();
+ $causes = array();
+ $this->getCauseMessage($causes);
+ $html = '<table style="border: 1px" cellspacing="0">' . "\n";
+ foreach ($causes as $i => $cause) {
+ $html .= '<tr><td colspan="3" style="background: #ff9999">'
+ . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: '
+ . htmlspecialchars($cause['message']) . ' in <b>' . $cause['file'] . '</b> '
+ . 'on line <b>' . $cause['line'] . '</b>'
+ . "</td></tr>\n";
+ }
+ $html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>' . "\n"
+ . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>'
+ . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>'
+ . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n";
+
+ foreach ($trace as $k => $v) {
+ $html .= '<tr><td style="text-align: center;">' . $k . '</td>'
+ . '<td>';
+ if (!empty($v['class'])) {
+ $html .= $v['class'] . $v['type'];
+ }
+ $html .= $v['function'];
+ $args = array();
+ if (!empty($v['args'])) {
+ foreach ($v['args'] as $arg) {
+ if (is_null($arg)) $args[] = 'null';
+ elseif (is_array($arg)) $args[] = 'Array';
+ elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')';
+ elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false';
+ elseif (is_int($arg) || is_double($arg)) $args[] = $arg;
+ else {
+ $arg = (string)$arg;
+ $str = htmlspecialchars(substr($arg, 0, 16));
+ if (strlen($arg) > 16) $str .= '&hellip;';
+ $args[] = "'" . $str . "'";
+ }
+ }
+ }
+ $html .= '(' . implode(', ',$args) . ')'
+ . '</td>'
+ . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown')
+ . ':' . (isset($v['line']) ? $v['line'] : 'unknown')
+ . '</td></tr>' . "\n";
+ }
+ $html .= '<tr><td style="text-align: center;">' . ($k+1) . '</td>'
+ . '<td>{main}</td>'
+ . '<td>&nbsp;</td></tr>' . "\n"
+ . '</table>';
+ return $html;
+ }
+
+ public function toText()
+ {
+ $causes = array();
+ $this->getCauseMessage($causes);
+ $causeMsg = '';
+ foreach ($causes as $i => $cause) {
+ $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': '
+ . $cause['message'] . ' in ' . $cause['file']
+ . ' on line ' . $cause['line'] . "\n";
+ }
+ return $causeMsg . $this->getTraceAsString();
+ }
+}<?php
/**
* PEAR_Frontend, the singleton-based frontend for user input/output
*
@@ -69647,7 +70300,7 @@ $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null;
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -69845,7 +70498,7 @@ class PEAR_Frontend extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: CLI.php 296938 2010-03-27 16:16:25Z dufuz $
+ * @version CVS: $Id: CLI.php 305390 2010-11-15 23:46:43Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -69862,7 +70515,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Frontend.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
@@ -70231,7 +70884,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
case 'install':
case 'upgrade':
case 'upgrade-all':
- if (isset($data['release_warnings'])) {
+ if (is_array($data) && isset($data['release_warnings'])) {
$this->_displayLine('');
$this->_startTable(array(
'border' => false,
@@ -70242,7 +70895,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
$this->_displayLine('');
}
- $this->_displayLine($data['data']);
+ $this->_displayLine(is_array($data) ? $data['data'] : $data);
break;
case 'search':
$this->_startTable($data);
@@ -70250,12 +70903,19 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
}
+ $packages = array();
foreach($data['data'] as $category) {
- foreach($category as $pkg) {
- $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
+ foreach($category as $name => $pkg) {
+ $packages[$pkg[0]] = $pkg;
}
}
+ $p = array_keys($packages);
+ natcasesort($p);
+ foreach ($p as $name) {
+ $this->_tableRow($packages[$name], null, array(1 => array('wrap' => 55)));
+ }
+
$this->_endTable();
break;
case 'list-all':
@@ -70269,13 +70929,21 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
$this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
}
+ $packages = array();
foreach($data['data'] as $category) {
- foreach($category as $pkg) {
- unset($pkg[4], $pkg[5]);
- $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
+ foreach($category as $name => $pkg) {
+ $packages[$pkg[0]] = $pkg;
}
}
+ $p = array_keys($packages);
+ natcasesort($p);
+ foreach ($p as $name) {
+ $pkg = $packages[$name];
+ unset($pkg[4], $pkg[5]);
+ $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
+ }
+
$this->_endTable();
break;
case 'config-show':
@@ -70582,7 +71250,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Installer.php 287446 2009-08-18 11:45:05Z dufuz $
+ * @version CVS: $Id: Installer.php 308692 2011-02-25 23:31:16Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -70606,14 +71274,12 @@ define('PEAR_INSTALLER_NOBINARY', -240);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
class PEAR_Installer extends PEAR_Downloader
{
- // {{{ properties
-
/** name of the package directory, for example Foo-1.0
* @var string
*/
@@ -70675,10 +71341,6 @@ class PEAR_Installer extends PEAR_Downloader
*/
var $file_operations = array();
- // }}}
-
- // {{{ constructor
-
/**
* PEAR_Installer constructor.
*
@@ -70704,8 +71366,6 @@ class PEAR_Installer extends PEAR_Downloader
$this->_registry = &$config->getRegistry();
}
- // }}}
-
function _removeBackups($files)
{
foreach ($files as $path) {
@@ -70713,8 +71373,6 @@ class PEAR_Installer extends PEAR_Downloader
}
}
- // {{{ _deletePackageFiles()
-
/**
* Delete a package's installed files, does not remove empty directories.
*
@@ -70773,9 +71431,6 @@ class PEAR_Installer extends PEAR_Downloader
return true;
}
- // }}}
- // {{{ _installFile()
-
/**
* @param string filename
* @param array attributes from <file> tag in package.xml
@@ -70785,7 +71440,7 @@ class PEAR_Installer extends PEAR_Downloader
*/
function _installFile($file, $atts, $tmp_path, $options)
{
- // {{{ return if this file is meant for another platform
+ // return if this file is meant for another platform
static $os;
if (!isset($this->_registry)) {
$this->_registry = &$this->config->getRegistry();
@@ -70809,10 +71464,9 @@ class PEAR_Installer extends PEAR_Downloader
return PEAR_INSTALLER_SKIPPED;
}
}
- // }}}
$channel = $this->pkginfo->getChannel();
- // {{{ assemble the destination paths
+ // assemble the destination paths
switch ($atts['role']) {
case 'src':
case 'extsrc':
@@ -70874,7 +71528,6 @@ class PEAR_Installer extends PEAR_Downloader
if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) {
return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED);
}
- // }}}
if (empty($this->_options['register-only']) &&
(!file_exists($dest_dir) || !is_dir($dest_dir))) {
@@ -70903,7 +71556,7 @@ class PEAR_Installer extends PEAR_Downloader
$md5sum = md5_file($dest_file);
}
} else {
- // {{{ file with replacements
+ // file with replacements
if (!file_exists($orig_file)) {
return $this->raiseError("file does not exist",
PEAR_INSTALLER_FAILED);
@@ -70980,10 +71633,9 @@ class PEAR_Installer extends PEAR_Downloader
}
fclose($wp);
- // }}}
}
- // {{{ check the md5
+ // check the md5
if (isset($md5sum)) {
if (strtolower($md5sum) === strtolower($atts['md5sum'])) {
$this->log(2, "md5sum ok: $final_dest_file");
@@ -71009,8 +71661,8 @@ class PEAR_Installer extends PEAR_Downloader
}
}
}
- // }}}
- // {{{ set file permissions
+
+ // set file permissions
if (!OS_WINDOWS) {
if ($atts['role'] == 'script') {
$mode = 0777 & ~(int)octdec($this->config->get('umask'));
@@ -71028,7 +71680,6 @@ class PEAR_Installer extends PEAR_Downloader
}
}
}
- // }}}
if ($atts['role'] == 'src') {
rename($dest_file, $final_dest_file);
@@ -71056,9 +71707,6 @@ class PEAR_Installer extends PEAR_Downloader
return PEAR_INSTALLER_OK;
}
- // }}}
- // {{{ _installFile2()
-
/**
* @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
* @param string filename
@@ -71075,7 +71723,7 @@ class PEAR_Installer extends PEAR_Downloader
}
$channel = $pkg->getChannel();
- // {{{ assemble the destination paths
+ // assemble the destination paths
if (!in_array($atts['attribs']['role'],
PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) {
return $this->raiseError('Invalid role `' . $atts['attribs']['role'] .
@@ -71110,7 +71758,6 @@ class PEAR_Installer extends PEAR_Downloader
$dest_dir = dirname($final_dest_file);
$dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- // }}}
if (empty($this->_options['register-only'])) {
if (!file_exists($dest_dir) || !is_dir($dest_dir)) {
@@ -71189,7 +71836,7 @@ class PEAR_Installer extends PEAR_Downloader
}
}
- // {{{ check the md5
+ // check the md5
if (isset($md5sum)) {
// Make sure the original md5 sum matches with expected
if (strtolower($md5sum) === strtolower($attribs['md5sum'])) {
@@ -71224,8 +71871,7 @@ class PEAR_Installer extends PEAR_Downloader
$real_atts['attribs']['md5sum'] = md5_file($dest_file);
}
- // }}}
- // {{{ set file permissions
+ //set file permissions
if (!OS_WINDOWS) {
if ($role->isExecutable()) {
$mode = 0777 & ~(int)octdec($this->config->get('umask'));
@@ -71243,7 +71889,6 @@ class PEAR_Installer extends PEAR_Downloader
}
}
}
- // }}}
if ($attribs['role'] == 'src') {
rename($dest_file, $final_dest_file);
@@ -71265,9 +71910,6 @@ class PEAR_Installer extends PEAR_Downloader
return PEAR_INSTALLER_OK;
}
- // }}}
- // {{{ addFileOperation()
-
/**
* Add a file operation to the current file transaction.
*
@@ -71308,9 +71950,6 @@ class PEAR_Installer extends PEAR_Downloader
$this->file_operations[] = array($type, $data);
}
- // }}}
- // {{{ startFileTransaction()
-
function startFileTransaction($rollback_in_case = false)
{
if (count($this->file_operations) && $rollback_in_case) {
@@ -71319,16 +71958,11 @@ class PEAR_Installer extends PEAR_Downloader
$this->file_operations = array();
}
- // }}}
- // {{{ commitFileTransaction()
-
function commitFileTransaction()
{
- $n = count($this->file_operations);
- $this->log(2, "about to commit $n file operations");
- // {{{ first, check permissions and such manually
+ //first, check permissions and such manually
$errors = array();
- foreach ($this->file_operations as $tr) {
+ foreach ($this->file_operations as $key => $tr) {
list($type, $data) = $tr;
switch ($type) {
case 'rename':
@@ -71351,6 +71985,7 @@ class PEAR_Installer extends PEAR_Downloader
if (!file_exists($data[0])) {
$this->log(2, "warning: file $data[0] doesn't exist, can't be deleted");
}
+
// check that directory is writable
if (file_exists($data[0])) {
if (!is_writable(dirname($data[0]))) {
@@ -71365,12 +72000,32 @@ class PEAR_Installer extends PEAR_Downloader
fclose($fp);
}
}
+
+ /* Verify we are not deleting a file owned by another package
+ * This can happen when a file moves from package A to B in
+ * an upgrade ala http://pear.php.net/17986
+ */
+ $info = array(
+ 'package' => strtolower($this->pkginfo->getName()),
+ 'channel' => strtolower($this->pkginfo->getChannel()),
+ );
+ $result = $this->_registry->checkFileMap($data[0], $info, '1.1');
+ if (is_array($result)) {
+ $res = array_diff($result, $info);
+ if (!empty($res)) {
+ $new = $this->_registry->getPackage($result[1], $result[0]);
+ $this->file_operations[$key] = false;
+ $this->log(3, "file $data[0] was scheduled for removal from {$this->pkginfo->getName()} but is owned by {$new->getChannel()}/{$new->getName()}, removal has been cancelled.");
+ }
+ }
}
break;
}
-
}
- // }}}
+
+ $n = count($this->file_operations);
+ $this->log(2, "about to commit $n file operations for " . $this->pkginfo->getName());
+
$m = count($errors);
if ($m > 0) {
foreach ($errors as $error) {
@@ -71385,7 +72040,7 @@ class PEAR_Installer extends PEAR_Downloader
}
$this->_dirtree = array();
- // {{{ really commit the transaction
+ // really commit the transaction
foreach ($this->file_operations as $i => $tr) {
if (!$tr) {
// support removal of non-existing backups
@@ -71506,15 +72161,12 @@ class PEAR_Installer extends PEAR_Downloader
break;
}
}
- // }}}
+
$this->log(2, "successfully committed $n file operations");
$this->file_operations = array();
return true;
}
- // }}}
- // {{{ rollbackFileTransaction()
-
function rollbackFileTransaction()
{
$n = count($this->file_operations);
@@ -71558,18 +72210,12 @@ class PEAR_Installer extends PEAR_Downloader
$this->file_operations = array();
}
- // }}}
- // {{{ mkDirHier($dir)
-
function mkDirHier($dir)
{
$this->addFileOperation('mkdir', array($dir));
return parent::mkDirHier($dir);
}
- // }}}
- // {{{ download()
-
/**
* Download any files and their dependencies, if necessary
*
@@ -71603,28 +72249,10 @@ class PEAR_Installer extends PEAR_Downloader
return $ret;
}
- // }}}
- // {{{ _parsePackageXml()
-
- function _parsePackageXml(&$descfile, &$tmpdir)
+ function _parsePackageXml(&$descfile)
{
- if (substr($descfile, -4) == '.xml') {
- $tmpdir = false;
- } else {
- // {{{ Decompress pack in tmp dir -------------------------------------
-
- // To allow relative package file names
- $descfile = realpath($descfile);
-
- if (PEAR::isError($tmpdir = System::mktemp('-d'))) {
- return $tmpdir;
- }
- $this->log(3, '+ tmp dir created at ' . $tmpdir);
- // }}}
- }
-
- // Parse xml file -----------------------------------------------
- $pkg = new PEAR_PackageFile($this->config, $this->debug, $tmpdir);
+ // Parse xml file
+ $pkg = new PEAR_PackageFile($this->config, $this->debug);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING);
PEAR::staticPopErrorHandling();
@@ -71644,7 +72272,6 @@ class PEAR_Installer extends PEAR_Downloader
return $p;
}
- // }}}
/**
* Set the list of PEAR_Downloader_Package objects to allow more sane
* dependency validation
@@ -71676,8 +72303,6 @@ class PEAR_Installer extends PEAR_Downloader
return $this->_downloadedPackages;
}
- // {{{ install()
-
/**
* Installs the files within the package file specified.
*
@@ -71705,17 +72330,20 @@ class PEAR_Installer extends PEAR_Downloader
$pkg = $pkgfile->getPackageFile();
$pkgfile = $pkg->getArchiveFile();
$descfile = $pkg->getPackageFile();
- $tmpdir = dirname($descfile);
} else {
$descfile = $pkgfile;
- $tmpdir = '';
- $pkg = $this->_parsePackageXml($descfile, $tmpdir);
+ $pkg = $this->_parsePackageXml($descfile);
if (PEAR::isError($pkg)) {
return $pkg;
}
}
+ $tmpdir = dirname($descfile);
if (realpath($descfile) != realpath($pkgfile)) {
+ // Use the temp_dir since $descfile can contain the download dir path
+ $tmpdir = $this->config->get('temp_dir', null, 'pear.php.net');
+ $tmpdir = System::mktemp("-d -t $tmpdir");
+
$tar = new Archive_Tar($pkgfile);
if (!$tar->extract($tmpdir)) {
return $this->raiseError("unable to unpack $pkgfile");
@@ -71758,7 +72386,7 @@ class PEAR_Installer extends PEAR_Downloader
$this->installroot = '';
}
- // {{{ checks to do when not in "force" mode
+ // checks to do when not in "force" mode
if (empty($options['force']) &&
(file_exists($this->config->get('php_dir')) &&
is_dir($this->config->get('php_dir')))) {
@@ -71873,7 +72501,6 @@ class PEAR_Installer extends PEAR_Downloader
}
}
}
- // }}}
$this->startFileTransaction();
@@ -71929,7 +72556,7 @@ class PEAR_Installer extends PEAR_Downloader
}
}
- // {{{ Copy files to dest dir ---------------------------------------
+ // Copy files to dest dir
// info from the package it self we want to access from _installFile
$this->pkginfo = &$pkg;
@@ -71943,13 +72570,12 @@ class PEAR_Installer extends PEAR_Downloader
}
}
- $tmp_path = dirname($descfile);
if (substr($pkgfile, -4) != '.xml') {
- $tmp_path .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion();
+ $tmpdir .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion();
}
$this->configSet('default_channel', $channel);
- // {{{ install files
+ // install files
$ver = $pkg->getPackagexmlVersion();
if (version_compare($ver, '2.0', '>=')) {
@@ -71971,9 +72597,9 @@ class PEAR_Installer extends PEAR_Downloader
foreach ($filelist as $file => $atts) {
$this->expectError(PEAR_INSTALLER_FAILED);
if ($pkg->getPackagexmlVersion() == '1.0') {
- $res = $this->_installFile($file, $atts, $tmp_path, $options);
+ $res = $this->_installFile($file, $atts, $tmpdir, $options);
} else {
- $res = $this->_installFile2($pkg, $file, $atts, $tmp_path, $options);
+ $res = $this->_installFile2($pkg, $file, $atts, $tmpdir, $options);
}
$this->popExpect();
@@ -71998,16 +72624,18 @@ class PEAR_Installer extends PEAR_Downloader
$pkg->installedFile($file, $atts);
}
}
- // }}}
- // {{{ compile and install source files
+ // compile and install source files
if ($this->source_files > 0 && empty($options['nobuild'])) {
+ if (!isset($options['__compile_configureoptions'])) {
+ $options['__compile_configureoptions'] = array();
+ }
+
if (PEAR::isError($err =
- $this->_compileSourceFiles($savechannel, $pkg))) {
+ $this->_compileSourceFiles($savechannel, $pkg, $options['__compile_configureoptions']))) {
return $err;
}
}
- // }}}
if (isset($backedup)) {
$this->_removeBackups($backedup);
@@ -72018,12 +72646,11 @@ class PEAR_Installer extends PEAR_Downloader
$this->configSet('default_channel', $savechannel);
return $this->raiseError("commit failed", PEAR_INSTALLER_FAILED);
}
- // }}}
$ret = false;
$installphase = 'install';
$oldversion = false;
- // {{{ Register that the package is installed -----------------------
+ // Register that the package is installed
if (empty($options['upgrade'])) {
// if 'force' is used, replace the info in registry
$usechannel = $channel;
@@ -72094,20 +72721,17 @@ class PEAR_Installer extends PEAR_Downloader
return $pkg->toArray(true);
}
- // }}}
-
- // {{{ _compileSourceFiles()
/**
* @param string
* @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
*/
- function _compileSourceFiles($savechannel, &$filelist)
+ function _compileSourceFiles($savechannel, &$filelist, $configure_options = array())
{
require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Builder.php';
$this->log(1, "$this->source_files source files, building");
$bob = &new PEAR_Builder($this->ui);
$bob->debug = $this->debug;
- $built = $bob->build($filelist, array(&$this, '_buildCallback'));
+ $built = $bob->build($filelist, array(&$this, '_buildCallback'), $configure_options);
if (PEAR::isError($built)) {
$this->rollbackFileTransaction();
$this->configSet('default_channel', $savechannel);
@@ -72166,7 +72790,6 @@ class PEAR_Installer extends PEAR_Downloader
}
}
-
$data = array(
'role' => $role,
'name' => $bn,
@@ -72184,12 +72807,10 @@ class PEAR_Installer extends PEAR_Downloader
}
}
- // }}}
function &getUninstallPackages()
{
return $this->_downloadedPackages;
}
- // {{{ uninstall()
/**
* Uninstall a package
@@ -72271,7 +72892,7 @@ class PEAR_Installer extends PEAR_Downloader
$this->pkginfo = &$pkg;
// pretty much nothing happens if we are only registering the uninstall
if (empty($options['register-only'])) {
- // {{{ Delete the files
+ // Delete the files
$this->startFileTransaction();
PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
if (PEAR::isError($err = $this->_deletePackageFiles($package, $channel))) {
@@ -72323,7 +72944,6 @@ class PEAR_Installer extends PEAR_Downloader
}
}
}
- // }}}
}
$this->configSet('default_channel', $savechannel);
@@ -72368,8 +72988,6 @@ class PEAR_Installer extends PEAR_Downloader
return 0;
}
- // }}}
- // {{{ _sortDirs()
function _sortDirs($a, $b)
{
if (strnatcmp($a, $b) == -1) return 1;
@@ -72377,10 +72995,6 @@ class PEAR_Installer extends PEAR_Downloader
return 0;
}
- // }}}
-
- // {{{ _buildCallback()
-
function _buildCallback($what, $data)
{
if (($what == 'cmdoutput' && $this->debug > 1) ||
@@ -72388,8 +73002,6 @@ class PEAR_Installer extends PEAR_Downloader
$this->ui->outputData(rtrim($data), 'build');
}
}
-
- // }}}
}<?php
/**
* PEAR_Installer_Role
@@ -72417,7 +73029,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72691,7 +73303,7 @@ class PEAR_Installer_Role
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72860,7 +73472,7 @@ class PEAR_Installer_Role_Common
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72901,7 +73513,7 @@ class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72942,7 +73554,7 @@ class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -72983,7 +73595,7 @@ class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -73024,7 +73636,7 @@ class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -73054,7 +73666,7 @@ class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: PackageFile.php 286670 2009-08-02 14:16:06Z dufuz $
+ * @version CVS: $Id: PackageFile.php 308688 2011-02-25 23:18:06Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -73080,7 +73692,7 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -73091,11 +73703,7 @@ class PEAR_PackageFile
*/
var $_config;
var $_debug;
- /**
- * Temp directory for uncompressing tgz files.
- * @var string|false
- */
- var $_tmpdir;
+
var $_logger = false;
/**
* @var boolean
@@ -73103,17 +73711,23 @@ class PEAR_PackageFile
var $_rawReturn = false;
/**
+ * helper for extracting Archive_Tar errors
+ * @var array
+ * @access private
+ */
+ var $_extractErrors = array();
+
+ /**
*
* @param PEAR_Config $config
* @param ? $debug
* @param string @tmpdir Optional temporary directory for uncompressing
* files
*/
- function PEAR_PackageFile(&$config, $debug = false, $tmpdir = false)
+ function PEAR_PackageFile(&$config, $debug = false)
{
$this->_config = $config;
$this->_debug = $debug;
- $this->_tmpdir = $tmpdir;
}
/**
@@ -73394,20 +74008,17 @@ class PEAR_PackageFile
}
}
- if ($this->_tmpdir) {
- $tmpdir = $this->_tmpdir;
- } else {
- $tmpdir = System::mkTemp(array('-t', $this->_config->get('temp_dir'), '-d', 'pear'));
- if ($tmpdir === false) {
- $ret = PEAR::raiseError("there was a problem with getting the configured temp directory");
- return $ret;
- }
-
- PEAR_PackageFile::addTempFile($tmpdir);
+ $tmpdir = System::mktemp('-t ' . $this->_config->get('temp_dir') . ' -d pear');
+ if ($tmpdir === false) {
+ $ret = PEAR::raiseError("there was a problem with getting the configured temp directory");
+ return $ret;
}
+ PEAR_PackageFile::addTempFile($tmpdir);
+
$this->_extractErrors();
PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors'));
+
if (!$xml || !$tar->extractList(array($xml), $tmpdir)) {
$extra = implode("\n", $this->_extractErrors());
if ($extra) {
@@ -73426,13 +74037,6 @@ class PEAR_PackageFile
}
/**
- * helper for extracting Archive_Tar errors
- * @var array
- * @access private
- */
- var $_extractErrors = array();
-
- /**
* helper callback for extracting Archive_Tar errors
*
* @param PEAR_Error|null $err
@@ -73574,7 +74178,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -73591,7 +74195,7 @@ class PEAR_PackageFile_Generator_v1
function getPackagerVersion()
{
- return '1.9.1';
+ return '1.10.0beta1';
}
/**
@@ -73745,7 +74349,7 @@ class PEAR_PackageFile_Generator_v1
);
$ret = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
$ret .= "<!DOCTYPE package SYSTEM \"http://pear.php.net/dtd/package-1.0\">\n";
- $ret .= "<package version=\"1.0\" packagerversion=\"1.9.1\">\n" .
+ $ret .= "<package version=\"1.0\" packagerversion=\"1.10.0beta1\">\n" .
" <name>$pkginfo[package]</name>";
if (isset($pkginfo['extends'])) {
$ret .= "\n<extends>$pkginfo[extends]</extends>";
@@ -74859,7 +75463,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'XML/Util.php';
* @author Stephan Schmidt (original XML_Serializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -74941,7 +75545,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
*/
function getPackagerVersion()
{
- return '1.9.1';
+ return '1.10.0beta1';
}
/**
@@ -75226,7 +75830,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
$this->options['beautifyFilelist'] = true;
}
- $arr['attribs']['packagerversion'] = '1.9.1';
+ $arr['attribs']['packagerversion'] = '1.10.0beta1';
if ($this->serialize($arr, $options)) {
return $this->_serializedData . "\n";
}
@@ -75744,7 +76348,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -76203,7 +76807,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -76565,7 +77169,7 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME', 52);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -77925,7 +78529,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ErrorStack.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -79956,7 +80560,7 @@ class PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Validator.php 277885 2009-03-27 19:29:31Z dufuz $
+ * @version CVS: $Id: Validator.php 308728 2011-02-27 18:58:02Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -79968,7 +80572,7 @@ class PEAR_PackageFile_v2
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a8
* @access private
@@ -80059,7 +80663,7 @@ class PEAR_PackageFile_v2_Validator
isset($test['dependencies']['required']) &&
isset($test['dependencies']['required']['pearinstaller']) &&
isset($test['dependencies']['required']['pearinstaller']['min']) &&
- version_compare('1.9.1',
+ version_compare('1.10.0beta1',
$test['dependencies']['required']['pearinstaller']['min'], '<')
) {
$this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
@@ -80203,11 +80807,10 @@ class PEAR_PackageFile_v2_Validator
$validator = $chan->getValidationObject($this->_pf->getPackage());
if (!$validator) {
$this->_stack->push(__FUNCTION__, 'error',
- array_merge(
array('channel' => $chan->getName(),
- 'package' => $this->_pf->getPackage()),
- $valpack
- ),
+ 'package' => $this->_pf->getPackage(),
+ 'name' => $valpack['_content'],
+ 'version' => $valpack['attribs']['version']),
'package "%channel%/%package%" cannot be properly validated without ' .
'validation package "%channel%/%name%-%version%"');
return $this->_isValid = 0;
@@ -81298,7 +81901,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 1.9.1');
+ 'version 1.10.0beta1');
}
function _invalidTagOrder($oktags, $actual, $root)
@@ -81992,7 +82595,8 @@ class PEAR_PackageFile_v2_Validator
}
continue 2;
case T_DOUBLE_COLON:
- if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) {
+ $token = $tokens[$i - 1][0];
+ if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC)) {
if (isset($this->_stack)) {
$this->_stack->push(__FUNCTION__, 'warning', array('file' => $file),
'Parser error: invalid PHP found in file "%file%"');
@@ -82137,7 +82741,7 @@ define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -84503,7 +85107,7 @@ class PEAR_Registry extends PEAR
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: REST.php 296767 2010-03-25 00:58:33Z dufuz $
+ * @version CVS: $Id: REST.php 308688 2011-02-25 23:18:06Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -84522,7 +85126,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -84594,7 +85198,10 @@ class PEAR_REST
$ret = $this->getCache($url);
if (!PEAR::isError($ret) && $trieddownload) {
// reset the age of the cache if the server says it was unmodified
- $this->saveCache($url, $ret, null, true, $cacheId);
+ $result = $this->saveCache($url, $ret, null, true, $cacheId);
+ if (PEAR::isError($result)) {
+ return PEAR::raiseErro($result->getMessage());
+ }
}
return $ret;
@@ -84611,7 +85218,11 @@ class PEAR_REST
}
if ($forcestring) {
- $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ if (PEAR::isError($result)) {
+ return PEAR::raiseErro($result->getMessage());
+ }
+
return $content;
}
@@ -84647,7 +85258,11 @@ class PEAR_REST
$content = $parser->getData();
}
- $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+ if (PEAR::isError($result)) {
+ return PEAR::raiseErro($result->getMessage());
+ }
+
return $content;
}
@@ -84706,57 +85321,65 @@ class PEAR_REST
*/
function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null)
{
- $cachedir = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . md5($url);
- $cacheidfile = $cachedir . 'rest.cacheid';
- $cachefile = $cachedir . 'rest.cachefile';
+ $cache_dir = $this->config->get('cache_dir');
+ $d = $cache_dir . DIRECTORY_SEPARATOR . md5($url);
+ $cacheidfile = $d . 'rest.cacheid';
+ $cachefile = $d . 'rest.cachefile';
if ($cacheid === null && $nochange) {
$cacheid = unserialize(implode('', file($cacheidfile)));
}
- $fp = @fopen($cacheidfile, 'wb');
- if (!$fp) {
- $cache_dir = $this->config->get('cache_dir');
+ if (is_link($cacheidfile)) {
+ return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $cacheidfile . ' as it is symlinked to ' . readlink($cacheidfile) . ' - Possible symlink attack');
+ }
+
+ if (is_link($cachefile)) {
+ return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $cacheidfile . ' as it is symlinked to ' . readlink($cacheidfile) . ' - Possible symlink attack');
+ }
+
+ $cacheidfile_fp = @fopen($cacheidfile, 'wb');
+ if (!$cacheidfile_fp) {
if (is_dir($cache_dir)) {
- return false;
+ return PEAR::raiseError("The value of config option cache_dir ($cache_dir) is not a directory. ");
}
System::mkdir(array('-p', $cache_dir));
- $fp = @fopen($cacheidfile, 'wb');
- if (!$fp) {
- return false;
+ $cacheidfile_fp = @fopen($cacheidfile, 'wb');
+ if (!$cacheidfile_fp) {
+ return PEAR::raiseError("Could not open $cacheidfile for writing.");
}
}
if ($nochange) {
- fwrite($fp, serialize(array(
+ fwrite($cacheidfile_fp, serialize(array(
'age' => time(),
'lastChange' => $cacheid['lastChange'],
))
);
- fclose($fp);
+ fclose($cacheidfile_fp);
return true;
}
- fwrite($fp, serialize(array(
+ fwrite($cacheidfile_fp, serialize(array(
'age' => time(),
'lastChange' => $lastmodified,
))
);
+ fclose($cacheidfile_fp);
- fclose($fp);
- $fp = @fopen($cachefile, 'wb');
- if (!$fp) {
+ $cachefile_fp = @fopen($cachefile, 'wb');
+ if (!$cachefile_fp) {
if (file_exists($cacheidfile)) {
@unlink($cacheidfile);
}
- return false;
+ return PEAR::raiseError("Could not open $cacheidfile for writing.");
}
- fwrite($fp, serialize($contents));
- fclose($fp);
+ fwrite($cachefile_fp, serialize($contents));
+ fclose($cachefile_fp);
return true;
}
@@ -84842,7 +85465,7 @@ class PEAR_REST
}
$request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.1/PHP/" . PHP_VERSION . "\r\n";
+ "User-Agent: PEAR/1.10.0beta1/PHP/" . PHP_VERSION . "\r\n";
$username = $this->config->get('username', null, $channel);
$password = $this->config->get('password', null, $channel);
@@ -84968,7 +85591,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/REST.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a12
*/
@@ -86500,7 +87123,7 @@ End If
*/
if ($this->php_bin == '') {
print "
-We do not find any php.exe, please select the php.exe folder (CLI is
+We did not find any php.exe, please select the php.exe folder (CLI is
recommended, usually in c:\php\cli\php.exe)
";
$this->validPHPBin = false;
@@ -86896,7 +87519,7 @@ define('PEAR_TASK_PACKAGEANDINSTALL', 3);
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
* @abstract
@@ -87077,7 +87700,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -87396,7 +88019,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Postinstallscript.p
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -87564,7 +88187,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -87739,7 +88362,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Replace.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -87799,7 +88422,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -87875,7 +88498,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Unixeol.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -87930,7 +88553,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -88006,7 +88629,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Windowseol.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
*/
@@ -88069,7 +88692,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validator/PECL.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -88689,7 +89312,7 @@ require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a5
*/
@@ -88750,7 +89373,7 @@ class PEAR_Validator_PECL extends PEAR_Validate
* @author Stephan Schmidt (original XML_Unserializer code)
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.9.1
+ * @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
@@ -89794,8 +90417,8 @@ class Structures_Graph_Node {
/* }}} */
}
?>
-package.xml
-<package packagerversion="1.9.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+package.xml
+<package packagerversion="1.9.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Structures_Graph</name>
<channel>pear.php.net</channel>
<summary>Graph datastructure manipulation library</summary>
@@ -89814,10 +90437,10 @@ as well as for characteristic extraction from the graph topology.</description>
<email>brett.bieber@gmail.com</email>
<active>yes</active>
</helper>
- <date>2009-10-11</date>
- <time>14:29:28</time>
+ <date>2010-10-25</date>
+ <time>21:45:17</time>
<version>
- <release>1.0.3</release>
+ <release>1.0.4</release>
<api>1.0.3</api>
</version>
<stability>
@@ -89827,10 +90450,7 @@ as well as for characteristic extraction from the graph topology.</description>
<license>LGPL License</license>
<notes>
Bugfix Release:
-Version 1.0.3 is functionally equivalent to 1.0.2 but with an updated package.xml file.
-* Correct invalid md5 sum preventing installation with pyrus [saltybeagle]
-* Add compatible tag for PEAR 1.5.0RC3-1.9.0 [saltybeagle]
-* Update package.xml
+* Bug #17108 BasicGraph::test_directed_degree fails on PHP 5 [clockwerx]
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -89857,7 +90477,7 @@ Version 1.0.3 is functionally equivalent to 1.0.2 but with an updated package.xm
<file baseinstalldir="/" md5sum="ce2da39dbb75e21074eb5e96231a3379" name="docs/generate.sh" role="doc" />
<file baseinstalldir="/" md5sum="f0aff5a1efd188d63b4b8b9e9e840b97" name="Structures/Graph/Manipulator/AcyclicTest.php" role="php" />
<file baseinstalldir="/" md5sum="0492e677436d29228df93dca23629e06" name="Structures/Graph/Manipulator/TopologicalSorter.php" role="php" />
- <file baseinstalldir="/" md5sum="2529b0cbcf0791dd87f3ec060a6a0eb9" name="Structures/Graph/Node.php" role="php" />
+ <file baseinstalldir="/" md5sum="254ebaba7537ad0f36e63eb8b975cc51" name="Structures/Graph/Node.php" role="php" />
<file baseinstalldir="/" md5sum="4f25a6275af156f6f8e7b4309cb9f40d" name="Structures/Graph.php" role="php" />
<file baseinstalldir="/" md5sum="5791baa61d5d36442be58ea5cd9d4bd0" name="tests/testCase/BasicGraph.php" role="test" />
<file baseinstalldir="/" md5sum="4fed49ef60db01eed800105aae4f2c8b" name="tests/AllTests.php" role="test" />
@@ -89868,7 +90488,7 @@ Version 1.0.3 is functionally equivalent to 1.0.2 but with an updated package.xm
<name>PEAR</name>
<channel>pear.php.net</channel>
<min>1.5.0RC3</min>
- <max>1.9.0</max>
+ <max>1.9.1</max>
</compatible>
<dependencies>
<required>
@@ -89917,9 +90537,25 @@ Version 1.0.3 is functionally equivalent to 1.0.2 but with an updated package.xm
* Update package.xml
</notes>
</release>
+ <release>
+ <version>
+ <release>1.0.4</release>
+ <api>1.0.3</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2010-10-25</date>
+ <license>LGPL License</license>
+ <notes>
+Bugfix Release:
+* Bug #17108 BasicGraph::test_directed_degree fails on PHP 5 [clockwerx]
+ </notes>
+ </release>
</changelog>
</package>
-
+
{
background-color: #CCCCFF;
margin: 0px;
@@ -89951,7 +90587,7 @@ Version 1.0.3 is functionally equivalent to 1.0.2 but with an updated package.xm
border: 1px solid black;
color: yellow;
}
-
+
a:hover { color: #6699CC; text-decoration: underline; }
a:active { color: #6699CC; text-decoration: underline; }
@@ -90085,7 +90721,7 @@ dd { margin-left: 0px; padding-left: 1em; }
.cmd-title { font-weight: bold }
.toc { margin-left: 2em; padding-left: 0em }
-
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -90327,7 +90963,7 @@ dd { margin-left: 0px; padding-left: 1em; }
Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -90431,7 +91067,7 @@ dd { margin-left: 0px; padding-left: 1em; }
Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -90537,7 +91173,7 @@ dd { margin-left: 0px; padding-left: 1em; }
Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -91085,7 +91721,7 @@ dd { margin-left: 0px; padding-left: 1em; }
Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -91159,7 +91795,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -91277,7 +91913,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -91409,7 +92045,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -91513,7 +92149,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -91648,7 +92284,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</div></body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -91683,7 +92319,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -92021,7 +92657,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
<a class="index-letter" href="elementindex.html#t">t</a>
<a class="index-letter" href="elementindex.html#u">u</a>
</div> </body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -92356,7 +92992,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
<a class="index-letter" href="elementindex_Structures_Graph.html#t">t</a>
<a class="index-letter" href="elementindex_Structures_Graph.html#u">u</a>
</div> </body>
-</html>
+</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -92371,7 +93007,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</body>
-</html>
+</html>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
@@ -92394,7 +93030,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
If you see this message, you are using a non-frame-capable web client.</P>
</NOFRAMES>
</FRAMESET>
-</HTML>
+</HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -92446,7 +93082,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
</div>
<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.2.3</span></a></p>
</BODY>
-</HTML>
+</HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -92472,7 +93108,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
</div>
</div>
</body>
- </html>
+ </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -92492,7 +93128,7 @@ for ($i=0;$i&lt;sizeof($arcs);$i++) {
Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
</p>
</body>
-</html>
+</html>
<refnamediv>
<refname><classname>Structures_Graph</classname> Tutorial</refname>
<refpurpose>A first tour of graph datastructure manipulation</refpurpose>
@@ -92590,7 +93226,7 @@ for ($i=0;$i<sizeof($arcs);$i++) {
</para>
</refsect1>
</refentry>
-
+
(cd ..; tar czf docs/arch.tgz "{arch}")
rm -Rf "../{arch}"
rm -Rf ./html
@@ -92598,7 +93234,7 @@ mkdir -p ./html
phpdoc --directory ../Structures,./tutorials --target ./html --title "Structures_Graph Documentation" --output "HTML:frames" --defaultpackagename structures_graph --defaultcategoryname structures --pear
(cd ..; tar --absolute-names -xzf docs/arch.tgz)
#rm arch.tgz
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -92734,7 +93370,7 @@ class Structures_Graph_Manipulator_AcyclicTest {
}
/* }}} */
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -92887,7 +93523,7 @@ class Structures_Graph_Manipulator_TopologicalSorter {
}
/* }}} */
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -93161,6 +93797,10 @@ class Structures_Graph_Node {
* @access public
*/
function connectsTo(&$target) {
+ if (version_compare(PHP_VERSION, '5.0.0') >= 0) {
+ return in_array($target, $this->getNeighbours(), true);
+ }
+
$copy = $target;
$arcKeys = array_keys($this->_arcs);
foreach($arcKeys as $key) {
@@ -93225,7 +93865,7 @@ class Structures_Graph_Node {
/* }}} */
}
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -93379,7 +94019,7 @@ class Structures_Graph {
/* }}} */
}
?>
-
+
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +-----------------------------------------------------------------------------+
// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
@@ -93550,7 +94190,7 @@ class BasicGraph extends PHPUnit_Framework_TestCase
}
}
?>
-
+
/**
* Master Unit Test Suite file for Structures_Graph
@@ -93671,7 +94311,7 @@ if (PHPUnit_MAIN_METHOD == 'Structures_Graph_AllTests::main') {
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
?>
-
+
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
@@ -94228,7 +94868,7 @@ $GLOBALS['_System_temp_files'] = array();
* @author Tomas V.V. Cox <cox@idecnet.com>
* @copyright 1997-2006 The PHP Group
* @license http://opensource.org/licenses/bsd-license.php New BSD License
-* @version Release: 1.9.1
+* @version Release: 1.10.0beta1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
* @static
@@ -98721,4 +99361,4 @@ iEYEABECAAYFAkk8e2QACgkQcqMhusJF8XULZgCg0iwVLWueraJzK5s1AesDkVzv
GucAn22sSv3QiTSUWG9BmakiW9hFsb4V
=g2mr
-----END PGP SIGNATURE-----
-
+