User:DanielRenfro/ExtensionRepo

These are Daniel's notes about implementing a package management system for extensions.

Things I need to review

 * Package management in general
 * Debian package management
 * Homebrew
 * Smart Package Manager
 * CPAN
 * npm
 * http://en.opensuse.org/Package_management
 * The pros and cons of each package management system

Parts

 * Code to be added to core (eventually) that will handle extensions
 * An extension that turns a Mediawiki instance into a repository
 * MW does everything else, why not have it host it's own extensions?!

Metadata file
For 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:
 * extension name
 * version
 * description
 * dependencies -must be previously installed or being installed at the same time
 * pre-dependencies - mus be previously installed
 * recommended - strong relationship with another extension
 * suggests - weak relationship
 * breaks - extensions this extension will break
 * conflicts
 * replaces
 * provides
 * licensing
 * checksum(s)
 * list of files
 * platform architecture info if that's an issue
 * when, where and whom built this software/extension

Actions
The commands that a client will request and that the server/repository should handle.

Backend / Server
This code will turn Mediawiki into a repository for other extensions.

Frontend
This will (hopefully) be the godsend extension we are all looking for. It will handle all the extensions for a mediawiki instance.


 * user searches for extensions.
 * query goes to server as POST
 * this should be an API call
 * action=manageext, query=$search
 * server gets the query, searches through the table of extensions, returns results (as json or whatever)
 * user picks one ore more extensions to install or update
 * client mw sends a query to the server POST, with token
 * action=manageext, install=array($ext, $version), token=$token
 * server searches for required packages
 * find package
 * find prerequisite packages, loop recursively
 * do dependency-resolution, avoid dependency hell
 * send to the client


 * Also would be nice:
 * API module for installed extensions and their versions

Extension table
A table for all installed extensions. int          id varchar   name smallint version_major smallint version_minor smallint version_revision smallint version_build varchar  url varchar  repository