cvs: php4 /pear/PEAR/Command Package.php

From: Date: Tue, 21 May 2002 01:44:06 +0000
Subject: cvs: php4 /pear/PEAR/Command Package.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3994@lists.php.net to get a copy of this message
ssb Mon May 20 21:44:06 2002 EDT Modified files: /php4/pear/PEAR/Command Package.php Log: * package-list command no longer needed ("list" does the same thing and more) Index: php4/pear/PEAR/Command/Package.php diff -u php4/pear/PEAR/Command/Package.php:1.28 php4/pear/PEAR/Command/Package.php:1.29 --- php4/pear/PEAR/Command/Package.php:1.28 Mon May 20 21:38:50 2002 +++ php4/pear/PEAR/Command/Package.php Mon May 20 21:44:06 2002 @@ -16,7 +16,7 @@ // | Author: Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: Package.php,v 1.28 2002/05/21 01:38:50 ssb Exp $ +// $Id: Package.php,v 1.29 2002/05/21 01:44:06 ssb Exp $ require_once 'PEAR/Common.php'; require_once 'PEAR/Command/Common.php'; @@ -52,14 +52,6 @@ Extracts information from a package file and displays it. ', ), - 'package-list' => array( - 'summary' => 'List Files in Package', - 'function' => 'doPackageList', - 'shortcut' => 'pl', - 'options' => array(), - 'doc' => ' -', - ), 'package-validate' => array( 'summary' => 'Validate Package Consistency', 'function' => 'doPackageValidate', @@ -168,54 +160,6 @@ if (PEAR::isError($result)) { $this->ui->displayLine("Package failed: ".$result->getMessage()); } - return true; - } - - - function doPackageList($command, $options, $params) - { - // $params[0] -> the PEAR package to list its files - if (sizeof($params) != 1) { - return $this->raiseError("bad parameters, try \"help $command\""); - } - $obj = new PEAR_Common(); - - if (PEAR::isError($info = $obj->infoFromTgzFile($params[0]))) { - return $info; - } - $list =$info['filelist']; - $caption = 'Contents of ' . basename($params[0]); - $this->ui->startTable(array('caption' => $caption, - 'border' => true)); - $this->ui->tableRow(array('Package Files', 'Install Destination'), - array('bold' => true)); - foreach ($list as $file => $att) { - if (isset($att['baseinstalldir'])) { - $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR . - $file; - } else { - $dest = $file; - } - switch ($att['role']) { - case 'test': - $dest = '-- will not be installed --'; break; - case 'doc': - $dest = $this->config->get('doc_dir') . DIRECTORY_SEPARATOR . - $dest; - break; - case 'php': - default: - $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . - $dest; - } - $dest = preg_replace('!/+!', '/', $dest); - $file = preg_replace('!/+!', '/', $file); - $opts = array(0 => array('wrap' => 23), - 1 => array('wrap' => 45) - ); - $this->ui->tableRow(array($file, $dest), null, $opts); - } - $this->ui->endTable(); return true; }

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