Re: PEAR 1.4.0 dev UNOFFICIAL testing tarball available
| From: | Greg Beaver | Date: | Sat, 22 May 2004 18:26:41 +0000 |
| Subject: | Re: PEAR 1.4.0 dev UNOFFICIAL testing tarball available | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29562@lists.php.net to get a copy of this message | ||
One addendum:
$ pear list [channelname]
has been implemented to list all the packages installed in a particular channel, which is a BC break. To list files in a package, use
$ pear list-files [packagename]
$ pear list-installed
lists all installed packages in all channels
Greg
Greg Beaver wrote:
Hi, I just spent about half an hour typing up a detailed message describing how to use the new channels feature. Fortunately, my *****ing mozilla managed to delete all traces of it, and didn't post it at all. So, all I will say is that http://www.chiaraquartet.net/PEAR-1.4.0dev.tgz is available for pre-pre-alpha testing. It is a 99% feature-complete version of PEAR with channels. USE AT YOUR OWN RISK, THIS IS PRE-ALPHA CODE AVAILABLE ONLY TO HELP US FIND IMPLEMENTATION PROBLEMS. YOU'VE BEEN WARNED. New commands $ pear list-channels $ pear channel-add $ pear channel-update $ pear channel-delete $ pear update-channels (not functional yet - requires pearweb changes) configuration changes: Each channel has its own configuration. master_server is obsolete, this is specified in the channel definition file, channel.xml (see PEAR/ChannelFile.php for all parsing/generation functionality needed to create a channel definition file for use with pear channel-* commands) default_channel specifies which channel's configuration is being used. Each channel can install into its own directories, have its own preferred_state, its own verbose, etc. By default, all channels follow the pear channel's configuration. converting your old package.xml to the new version 1.1 is necessary to release a non-pear channel package. <?php require_once 'PEAR/ChannelFile.php'; $pc = new PEAR_ChannelFile; $err = $pc->fromPackageFile('package.xml'); if (PEAR::isError($err)) {die($err->getMessage());} foreach ($pc->getErrors(true) as $error) {echo ucfirst($error['level']) . ': ' . $error['message'] . "\n";} if (!$err) {die('Validation failed');} $pc->setPackagexmlVersion('1.1'); $fp = fopen('package.xml', 'wb'); fwrite($fp, $pc->toXml()); fclose($fp); ?> Once your package.xml is converted to the new format, it is no longer installable by PEAR 1.3.1 or earlier, and requires channels to work. You may want to maintain two package.xml versions and separate tarballs for those who do not/cannot upgrade their PEAR versions. This does not affect PEAR packages, only non-PEAR channels. Setting up a channel server requires implementation of package.listAll, package.listLatestReleases, package.info, and the /get url from pearweb. See: pearweb/public_html/get pearweb/include/pear-database.php, class package, methods listAll, listLatestReleases, info Greg