(rfc) recommend installing a plugin when needed

Robert Collins robertc at robertcollins.net
Wed Jan 30 03:54:21 GMT 2008


On Mon, 2008-01-28 at 06:23 -0200, Martin Albisetti wrote:
> I've been giving this spec more thought, so I thought I'd dump it into
> the list and see if I'm on the right track.
> 
> Things I think this plugin should provide:
> 
> - A hook that checks if the command executing is available as a plugin
> if all else failed, telling the user how he can install it (ie. bzr
> fetchplugin plugin-name)

I don't think this should be a hook or in a plugin; I think it should be
part of the core command-lookup facilities.

> - Install new plugins from a trusted source

This should be a command in the core of bzr (so its always available).

> - Install plugins from a possibly arbitrary URL with a switch like --url

Not sure about this one.

> - Update one or all plugins
> - Remove any installed plugins
> - List all plugins available

These three should be in the core.

> - Be pluggable to add a per-platform plugin that handles possible
> external dependencies

This point here is how I was envisaging *all* plugin installations would
happen.

That is, on a debian based system
'bzr add-plugin bzrtools' will:
 - invoke the bzr deb-plugin
   which will in turn do apt-get install bzr-bzrtools

On a rpm system the bzr rpm-plugin plugin will take care etc.

We can have a plugin that does checkouts-to-install plugins as well.


> How:
> - All plugins would be installed by doing a lightweight checkout into
> the users plugin folder, avoiding having to use a new transport method
> - Plugins can then be updated using a simple "bzr update" internally
> - Would allow for the plugins to live in different locations rather
> then a central one (although it's probably best if we do have a
> central repository, that would also mean delays in keeping the plugins
> up to date)
> - Have an XML file hosted on the bazaar-vcs.org server which contains
> the information of all available plugins with the necessary
> information (commands it provides, description, etc)

The above is something for the checkout-plugin plugin to handle; I don't
think that deb/rpm/gentoo etc plugin installs should do this.

> What remains to be thought through is how we would handle external dependencies.
> 
> Now, a few questions.
> Would this go right into the Core, or just tweak what would be needed
> and develop it as a plugin?
> Would be add the plugins information to the XML manually or would we
> require plugins export the information needed somehow?

setup.py in a plugin should provide all the metadata - the python
packages index considers this a solved problem. 

HTH
Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080130/1db0998c/attachment.pgp 


More information about the bazaar mailing list