Re: [jokosher-devel] Managing extensions
- From: Laszlo Pandy <laszlok2 gmail com>
- To: John Green <john thegreens co uk>
- Cc: jokosher dev-list <jokosher-devel-list gnome org>
- Subject: Re: [jokosher-devel] Managing extensions
- Date: Mon, 02 Oct 2006 16:41:00 -0400
John Green wrote:
I've started to look into the 'Manage Extensions' option in the
extensions menu and have a few questions on how extensions will be
Yes, thank you! Now I don't have to do it ;)
At the minute all the extensions we have are in a single directory. Some
of them consist of more than one file (typically a .py and a .glade for
instance). Some are a single .py. Freesound search has more than one
.py file. When jokosher loads the extensions it retrieves a list of all
.py files and executes the startup() function (if one exists). If we
allow extensions to span multiple .py files then this causes a couple of
problems. Firstly only one file will contain the startup function and
jokosher needs a method of determining which it is. Secondly as we add
more and more extensions with multiple files then eventually there will
be a clash of names. Perhaps we need to organise each extension within
its own subdirectory. Or we could just compel extensions to be contained
within a single module but this seems a bit restrictive to me.
How will the extensions be packaged? A simple extension consisting of a
single .py file is one thing but how will we package up multiple file
extensions. There is mention in the wiki of eggs about which I know
nothing I'm afraid. Are there ubuntu packages for it? The site pointed
to only seems to have source tarballs. We could also accept .tar.gz and
Aq is in fact the only one who knows anything about eggs. Last I heard
he was planning on putting some code in Extension.py that allowed
Jokosher to load files from eggs. Hopefully he will be back soon.
Actually you are talking about two separate things. First how will we
distribute extensions, and how will we store extensions in
~/.jokosher/extension/. I think .tar (or tar.gz if you really want to)
will work fine for the first use. We could also do eggs if Aq has time
to implement it.
One other thing to think about is: where should extensions keep their
own config files? If we put them all in ~/.jokosher/extensions/ we will
probably run into name conflicts. This makes having separate dirs even
I think it would be helpful if extensions had a narrative that described
their purpose briefly in one line so that the manager can display it in
the list of installed extensions. (I'm thinking similar to firefox
extensions here.) Of course you can only uninstall user extensions.
Should you also be allowed to install a user extension with the same
name as a system one? The user one would override the system one.
I thought about this for a while and I have come to the conclusion that
we shouldn't allow extensions to be installed system wide. This
primarily comes down to the fact that if the user wants to turn off an
extension (maybe its buggy or they just don't like it) and its in
/usr/lib/jokosher/extensions/ they can't. This presents a usability
problem for the extension manager because people will be puzzled by the
fact that some extensions can be uninstalled and others can't.
But of course we want to be able to ship extensions with a Jokosher install.
Right now on startup jokosher checks if the folders extensions, presets,
instruments, etc. exist in ~/.jokosher/. If they don't exist they are
created. If no extension dir exists, we can just copy the one from
/usr/lib/jokosher/extensions/ complete with the default extensions
inside. This allows the user to control what extensions are running, and
uninstalling one of the default extensions does not remove it for
everyone else on the system.
] [Thread Prev