cvs: pear-core /PEAR/Command Install.php

From: Date: Sun, 20 Feb 2005 21:04:21 +0000
Subject: cvs: pear-core /PEAR/Command Install.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-29565@lists.php.net to get a copy of this message
cellog Sun Feb 20 16:04:21 2005 EDT Modified files: /pear-core/PEAR/Command Install.php Log: spit out extra information about installation (install groups, post-install scripts) after all package installs have been attempted as requested by Jan Schneider http://cvs.php.net/diff.php/pear-core/PEAR/Command/Install.php?r1=1.88&r2=1.89&ty=u Index: pear-core/PEAR/Command/Install.php diff -u pear-core/PEAR/Command/Install.php:1.88 pear-core/PEAR/Command/Install.php:1.89 --- pear-core/PEAR/Command/Install.php:1.88 Sun Feb 20 00:18:54 2005 +++ pear-core/PEAR/Command/Install.php Sun Feb 20 16:04:20 2005 @@ -16,7 +16,7 @@ // | Author: Stig S?ther Bakken <ssb@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Install.php,v 1.88 2005/02/20 05:18:54 cellog Exp $ +// $Id: Install.php,v 1.89 2005/02/20 21:04:20 cellog Exp $ require_once "PEAR/Command/Common.php"; require_once "PEAR/Installer.php"; @@ -411,6 +411,7 @@ $this->raiseError($err->getMessage()); return true; } + $extrainfo = array(); foreach ($downloaded as $param) { PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $info = $this->installer->install($param, $options); @@ -465,24 +466,29 @@ $group['attribs']['name'] . ' available (' . $group['attribs']['hint'] . ')'); } - $this->ui->outputData('To install use "pear install ' . - $param->getPackage() . '#featurename"'); + $extrainfo[] = 'To install use "pear install ' . + $param->getPackage() . '#featurename"'; } } $pkg = &$reg->getPackage($param->getPackage(), $param->getChannel()); $pkg->setConfig($this->config); if ($list = $pkg->listPostinstallScripts()) { - $this->ui->outputData('This package has post-install scripts:'); + $extrainfo[] = 'This package has post-install scripts:'; foreach ($list as $file) { - $this->ui->outputData($file); + $extrainfo[] = $file; } - $this->ui->outputData('Use "pear run-scripts ' . $pkg->getPackage() . '" to run'); - $this->ui->outputData('DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES'); + $extrainfo[] = 'Use "pear run-scripts ' . $pkg->getPackage() . '" to run'; + $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES'; } } else { return $this->raiseError("$command failed"); } } + if (count($extrainfo)) { + foreach ($extrainfo as $info) { + $this->ui->outputData($info); + } + } return true; }

« previous php.pear.cvs (#29565) next »