cpran deps [options] [arguments]
This command checks the dependencies of the specified plugins and returns them in an ordered list, such as can be used in an installation schedule. While the internally returned list contains all plugins in the dependency tree, all but the topmost element are printed to STDOUT, so that the aggregated list of dependencies is what is printed.
The results of this command can be piped into e.g. cpran install
to prepare things for the installation of the plugins passed as arguments.
Arguments to B
# List the dependencies of a plugin
cpran deps basicplugin
# List the aggregated dependencies of multiple plugin
cpran deps basicplugin complexplugin
# Reinstall all dependencies for a plugin
cpran deps plugin | cpran install --reinstall
get_dependencies
Query the desired plugins for dependencies.
Takes either the name of a single plugin, or a list of names, and return an array of hashes properly formatted for processing with order_dependencies.
order_dependencies
Order required packages, so that those that are depended upon come up first than those that depend on them.
The argument is an array of hashes, each of which needs a “name” key that identifies the item, and a “reqname” holding the reference to an array with the names of the items that are required.
Code for this method has been based on an answer by ikegami on StackOverflow.