User:DanielRenfro/ExtensionRepo/Technical
There will be code added to core that logically can be split into two different parts:
- Frontend/client code
- This is where extensions can be browsed, rated, downloaded/uploaded, installed, activated, configured, etc. and repositories can be added or removed.
- This code will be implemented as a (series of?) SpecialPage(s)
- Repository/server code
- This code manages the extensions to be served to the frontent clients.
- Clients can be remote, or local.
Things I need to review
edit- Package management in general
- The pros and cons of each package management system
Options/configuration
edit- keep all old packages once updated or not (to save disk space)
- turn off repository behavior (default is on)
Metadata file
editFor the extension-manager to work correctly we'll need a manifest/metadata file that describes the extension. It will need to contain the following types of information in some parse-able format:
field | type | required | notes |
---|---|---|---|
extension id | string | yes |
|
extension name | string | yes | human readable name |
version | string | yes | |
description | string | no | binary text field |
dependencies | array of extension ids | no | must be previously installed or being installed at the same time |
pre-dependencies | array of extension ids | no | must be previously installed |
recommended | array of extension ids | no | strong relationship with another extension |
suggests | array of extension ids | no | weak relationship |
breaks | array of extension ids | no | extensions this extension will break |
conflicts | array of extension ids | no | |
replaces | array of extension ids | no | |
provides | array of extension ids | no | |
licensing | array of extension ids | no | |
checksum(s) | string | yes | |
list of files | ? | ||
arch | string | no | platform architecture info if that's an issue |
builddate | string -- YYYYMMDDHHMMSS | no | |
author(s) | string, array | no |
Actions
editExtensions
editCommand | Action | Notes |
---|---|---|
install [extension-package] | Install an extension-package. | This is not the same thing as activating an extension. Installation is required for a Mediaiwiki instance to server an extension-package (as a repository.) |
uninstall/ remove [extension-package] | Remove an installed extension. | This will deactivate an extension if it is activated. |
activate [extension-package] | Turn an extension on. | This is analogous to the current idea of installing an extension -- the functionality of the wiki is changed in some way. This action has the possibility of altering the wiki's infrastructure in some way (installed needed database tables, for example.) |
deactivate [extension-package] | Turn an extension off. | This is analogous to the current idea of uninstalling an extension. The functionality that the extension provided is now lost. |
search [query] | Search for an extension-package in the list of current repositories. | Query the listed repositories for installed packages that can be downloaded, installed and activated. |
list [installed, activated, all] | List the currently installed, activated, or both - extensions. | |
update [extension-package] | Query the repositories to see if an update is available and update an extension. | |
check-update [extension-package] | Check if an update is available. | |
update-to [extension-package] [version] | Update to a particular version. | |
downgrade [extension-package] | Downgrade an extension. | Might downgrade to a local, older copy of the extension, or fetch an older version. |
downgrade-to [extension-package] [version] | Downgrade to a particular version. | |
info [extension-package] | Get the information about a particular extension. | |
repolist | List the repositories and their state (added/activated.) | |
version [extension-package] | Get the version for an extension | |
history/log | ||
comment [extension-package] | ||
rate [extension-package] |
Repositories
editcommand | action | notes |
---|---|---|
add | Add a repository to the list. | |
remove | Remove a listed repository | |
activate | Activate this repository for querying, installations, etc. | |
deactivate | Deactivate this repository. | It will stay in the list, but won't be queried. |