Module luarocks.rep

Functions for managing the repository on disk.

Functions

get_versions (name) Get all installed versions of a package.
is_installed (name, version) Check if a package exists in a local repository.
package_modules (package, version) Obtain a list of modules within an installed package.
package_commands (package, version) Obtain a list of command-line scripts within an installed package.
has_binaries (name, version) Check if a rock contains binary executables.
delete_version (name, version) Delete a package from the local repository.


Functions

get_versions (name)
Get all installed versions of a package.

Parameters:

  • name: string: a package name.

Returns:

    table or nil: An array of strings listing installed versions of a package, or nil if none is available.
is_installed (name, version)
Check if a package exists in a local repository. Version numbers are compared as exact string comparison.

Parameters:

  • name: string: name of package
  • version: string: package version in string format

Returns:

    boolean: true if a package is installed, false otherwise.
package_modules (package, version)
Obtain a list of modules within an installed package.

Parameters:

  • package: string: The package name; for example "luasocket"
  • version: string: The exact version number including revision; for example "2.0.1-1".

Returns:

    table: A table of modules where keys are module identifiers in "foo.bar" format and values are pathnames in architecture-dependent "foo/bar.so" format. If no modules are found or if package or version are invalid, an empty table is returned.
package_commands (package, version)
Obtain a list of command-line scripts within an installed package.

Parameters:

  • package: string: The package name; for example "luasocket"
  • version: string: The exact version number including revision; for example "2.0.1-1".

Returns:

    table: A table of items where keys are command names as strings and values are pathnames in architecture-dependent ".../bin/foo" format. If no modules are found or if package or version are invalid, an empty table is returned.
has_binaries (name, version)
Check if a rock contains binary executables.

Parameters:

  • name: string: name of an installed rock
  • version: string: version of an installed rock

Returns:

    boolean: returns true if rock contains platform-specific binary executables, or false if it is a pure-Lua rock.
delete_version (name, version)
Delete a package from the local repository. Version numbers are compared as exact string comparison.

Parameters:

  • name: string: name of package
  • version: string: package version in string format
generated by LDoc 0.5