Re: PEAR Channels, draft 0.4

From: Date: Mon, 23 Feb 2004 13:42:58 +0000
Subject: Re: PEAR Channels, draft 0.4
References: 1  Groups: php.pear.core 
Request: Send a blank email to pear-core+get-114@lists.php.net to get a copy of this message
On Fri, 20 Feb 2004 12:35:21 -0500 greg@chiaraquartet.net (Greg Beaver) wrote: > Details > > ------- > > A channel has associated with it: > > - A summary, or brief description of what the channel provides > > - A master server (http://pear.php.net, http://pecl.php.net, > http://pear.horde.org > <http://www.horde.org/>) pecl.php.net === pear.php.net from the installer. See below. > - A name based on the master server, java-style (net.php.pear, > net.php.pecl, org.horde.pear) -1 Keep the obvious name used in the URI, as it is now. > The installer can have new channels registered with it manually > > $ pear register-channel myserver.com MyInstallRoot > > or, automatically > > $ pear update-channels > > Updating new channel net.php.pecl > > (http://pecl.php.net, no installroot) > > Updating new channel org.horde.pear > > (http://pear.horde.org, "Horde" installroot) One thing we can add is a channels server. We can allow channels definitions on our server and then the clients can query through it via the installer and install/upgrade them. That will increase the visibility of non php.net projects. > To download a package from a specific channel, use the format > "name.nick.channel::Packagename" > > $ pear install net.php.pear::Log > > $ pear install org.horde.pear::Log > > $ pear install com.myserver::Log > > If a non-specific package name is passed to the installer, a search > path will be used to find the package. The default search order will > be the order in which channels were registered, but this can be set in > the config > > $ pear config-set channel-path com.myserver org.horde.pear > net.php.pear net.php.pecl Adding a default channel to use is better imo. The "search everywhere" can be very dangerous and hasardeous. > Channel search path set to > myserver.com->pear.horde.org->pear.php.net->pecl.php.net > > In package.xml, channel can be specified in the package name > > <package> > > <name>net.php.pear::Log</name> > For Backwards Compatibility, if no channel is specified, the > net.php.pear channel will be assumed for all dependencies. > > Dependency specification might look like: > > <dep rel="has" type="pkg">net.php.pecl::APC</dep> > > <dep rel="eq" version="1.7.0" > type="pkg">org.horde.pear::Log</dep> > > In order to refer to a channel for listing commands, use the syntax > "net.name.channel::" as in: > > $ pear list-all net.php.pear:: > > It is NOT possible to upgrade across a channel. In other words: > > $ pear install net.php.pear::Foo > > $ pear upgrade org.horde.pear::Foo > > this sequence will fail because net.php.pear::Foo is not the same as > org.horde.pear::Foo even though the package name is the same. > > Sub-Channels > > ------------ > > A sub-channel is a separate collection of packages that share the same > namespace as a channel. In other words, if PEAR has a sub-channel > named QA, this sequence is possible: > $ pear install net.php.pear::Log > > install to 1.10 OK > > $ pear upgrade net.php.pear.qa::Log > > upgrade to 1.10.1 OK > > A sub-channel must be a sub-domain of a primary channel. > > A sub-channel may NEVER be specified in a package.xml, this is a > server-only implementation. What is the goals of the subchannels? I really miss the usage. QA does not require sub channels. And we can create a channel for specific usages like the tests suite. > INSERT INTO channels (id, parent, name, summary, server, installroot) > VALUES(2, 0, 'PHP PHP Extension Community Library', 'pecl.php.net', > ''); > > installroot) VALUES(3, 1, 'PHP Extension and Application Repository, > QA channel', 'qa.pear.php.net', ''); I'm really not sure it's a good idea to split pecl/pear as two distinct channels, at least as a default behavior. After the channels activations, pe(ar|cl)web should work exactly as now, with or without channels client on the client side. > Modify releases: > > ALTER TABLE releases ADD channel INTEGER NOT NULL REFERENCES > channels(id) default 1; > > Modify packages: > > ALTER TABLE packages ADD channel INTEGER NOT NULL REFERENCES > channels(id) default 1; > > UPDATE packages SET channel = 1 WHERE package_type = "pear"; > UPDATE packages SET channel = 2 WHERE package_type = "pecl"; > ALTER TABLE packages DROP package_type; -1, see upper. > A package may only belong to a channel, and not to a sub-channel, and > a release's channel may only belong to either its package's channel or > a sub-channel of that channel. > Allow local mirroring of channels. This should be described in a > completely separate RFC. > > <channel mirrors="PEAR"> > <name>PEAR</name> > <source type="relpath">pear/</source> > <summary>Copy of PEAR repository as of 12-05-2003 on CD-ROM</summary> > </channel> Mirrors support are planed (see the discussions on this list). Should be added later :). > add packagelist.xml which is a listing of all packages in a source > channel. It contains all the <package> tags for every release > available in the channel (perhaps an abbreviated version with only the > package name, summary, relative path to the .tgz, and dependencies to > save space?) Space is not an issue imho. Besides the little things to discuss, can you send me the code you have for pearweb? I like to commit it but maybe not under the current pear-databases stuffs. There is many things to update before commiting this huge change. Hold your fingers for a short time :) pierre

« previous php.pear.core (#114) next »