list_packages
pkg-octave-doc: valid_packages = list_packages ()
pkg-octave-doc: valid_packages = list_packages (index)
List pkg-installable packages from Octave Packages.
valid_packages = list_packages () returns an Nx2 cell
array naming every package at Octave Packages that is installable with the
pkg command, against the URL of its latest release. A package
qualifies by declaring pkg among the dependencies of that release.
The index is fetched from Octave Packages, and a fetch that does not
succeed is an error saying so.
valid_packages = list_packages (index) reads the index
from index instead of fetching it, given either as the JSON text or
as the structure jsondecode returns for it. This is what makes the
selection testable without reaching the network, and it is useful against a
copy of the index taken earlier.
An index in which nothing qualifies returns an empty cell array rather than nothing at all.
Source Code: list_packages