Part of elisa.core.epm.egg_registry View In Hierarchy
Knows about static repositories and discovers dynamic repositories, update the local cache and answers to queries about plugins: installed ones, uninstalled, upgradeables, dependencies.
Line # | Kind | Name | Docs |
---|---|---|---|
70 | Method | __init__ | Initialize repositories and set the local cache file. |
128 | Method | get_repositories | Get the list of known static and dynamic repositories. |
171 | Method | list_plugins | Undocumented |
174 | Method | update_cache | Cache locally information about plugins from static repositories. |
232 | Method | get_plugin | Get the plugin by name, version and repository source. |
279 | Method | get_plugin_deps_for | Retrieve the dependencies for a plugin. |
306 | Method | get_uninstalled_plugin_deps_for | Retrieve the uninstalled dependencies for a plugin. |
367 | Method | get_installed_plugins | Retrieve the list of installed plugins. |
385 | Method | get_upgradeable_plugins | Get the list of upgradeable plugins. |
414 | Method | get_installed_dependent_plugins | Retrieve the plugins that depend on the specified one. |
526 | Method | easy_install_plugin | Undocumented |
779 | Method | upgrade | Undocumented |
861 | Method | remove | Remove an installed plugin by name. |
895 | Method | get_info | Get information about a plugin. |
118 | Method | _load_static_repositories | Undocumented |
124 | Method | _discover_dynamic_repositories | Discover actually existent dynamic repositories. |
136 | Method | _blocking_list_plugins | Load plugins from the cache and from dynamic repositories. |
442 | Method | _blocking_easy_install_plugin | Use easy_install internal API to install. |
624 | Method | _custom_install | Install a plugin resolving dependecies. |
730 | Method | _blocking_upgrade | Upgrade one or all the installed plugins. |
784 | Method | _async_upgrade | Upgrade one or all the installed plugins. |
Loads the statically configured repositories and discovers the dynamic ones actually present at this time. Set the user's local cache file location, creating it if doesn't exist, using a sensible default in the Elisa user directory.
Parameters | cache_file | the absolute path to the user's local cache file. (type: a string ) |
static_sources | an alternative sources' list (type: list of strings ) | |
plugin_dirs | the directory where to search for installed plugins (type: list of strings ) |
Returns | the list of repositories
(type: list of epm.egg_repository.EggRepository
) |
Parameters | source | the source of the repository, to filter plugins' origin (type: string ) |
Returns | the discovered plugins
(type: list of epm.egg_plugin.EggPlugin s
) |
Try to contact all known static repositories: if a problem occurs with one of those, just retrieve that information from the local cache, in order not to clean the cache just for a missing Internet connection (for example.)
Returns | a deferred trigged when all work is done
(type: twisted.internet.defer.Defer
) |
The information about the plugin is retrieved through "self.cached_plugin_list", if possible. Otherwise we launch "self._blocking_list_plugins()", even if the first time can block...
If the version is not specified the plugin with gratest version number should be reported; if more than one with the same version number is found, the first in the list is returned.
Parameters | name | the name of the plugin (type: string ) |
version | the version of the plugin. None to get the latest one (type: string ) | |
source | the source URL of the repository (type: string ) | |
Returns | the plugin, if found in the repositories. None, otherwise
(type: epm.egg_plugin.EggPlugin
) |
Search the dependencies graph, assuming that there are no circular dependencies.
Parameters | plugin_name | the name of the plugin (type: string ) |
plugin_version | the version of the plugin (type: string ) | |
Returns | the list of dependencies (type: a list of dicts ) |
Also report the dependencies needing an upgrade.
Search the dependencies graph, pruning trees when a dependence is known to be already installed, because we assume that is has already its dependecies satisfied. Assume that there are no circular dependencies.
Parameters | plugin_name | the name of the plugin (type: string ) |
plugin_version | the version of the plugin (type: string ) | |
installed_plugins | a cached list of installed plugins (type: list of strings ) | |
Returns | the list of uninstalled dependecies (type: a list of dicts ) |
Can filter by plugin name, returning at most one plugin.
Returns | the list of installed plugins
(type: list of epm.egg_plugin.EggPlugin s
) |
If a plugin is no more in the repository, sure it is not upgradeable.
Parameters | update_states | the update states you want to filter on (type: list of string ) |
Returns | the list of upgradeable plugins
(type: a list of epm.egg_plugin.EggPlugin
) |
Assume that there are not circular dependencies.
Parameters | plugin_name | the name of the plugin (type: string ) |
installed_plugins | a cached list of installed plugins (type: list of strings ) | |
Returns | the list of plugins that depends on the specified one (type: list of strings ) |
Parameters | plugin_name | the name of the egg distribution to install. It should be something like "elisa-plugin-*" (type: string ) |
plugin_version | the version to install, or None to get the latest found (type: string ) | |
directory | the absolute path to the installation directory (type: string ) |
The dependencies are resolved from the repository plugins the registry is aware of.
Parameters | plugin_name | the plugin name (or file path) to install (type: string ) |
plugin_version | the plugin version to install (type: string ) | |
Returns | a deferred
(type: twisted.internet.defer.DeferredList
) |
Parameters | plugin_name | the name of the installed plugin. Or None. (type: string ) |
Returns | a deferred
(type: twisted.internet.defer.Deferred
) |
Parameters | plugin_name | the name of the installed plugin. Or None. (type: string ) |
Returns | a deferred
(type: twisted.internet.defer.Deferred
) |