Class luci.model.ipkg

Functions

compare_versions (ver1, ver2, comp) lua version of opkg compare-versions
find (pat, cb) Find packages that match the given pattern.
info (pkg) Return information about installed and available packages.
install (...) Install one or more packages.
installed (pkg) Determine whether a given package is installed.
list_all (pat, cb) List all packages known to opkg.
list_installed (pat, cb) List installed packages.
overlay_root () Determines the overlay root used by opkg.
remove (...) Remove one or more packages.
status (pkg) Return the package status of one or more packages.
update () Update package lists.
upgrade () Upgrades all installed packages.


Functions

compare_versions (ver1, ver2, comp)
lua version of opkg compare-versions

Parameters

  • ver1: string version 1
  • ver2: string version 2
  • comp: string compare versions using "<=" or "<" lower-equal ">" or ">=" greater-equal "=" equal "<<" lower ">>" greater "~=" not equal

Return value:

Boolean indicating the status of the compare
find (pat, cb)
Find packages that match the given pattern.

Parameters

  • pat: Find packages whose names or descriptions match this pattern, nil results in zero results
  • cb: Callback function invoked for each patckage, receives name, version and description as arguments

Return value:

nothing
info (pkg)
Return information about installed and available packages.

Parameters

  • pkg: Limit output to a (set of) packages

Return value:

Table containing package information
install (...)
Install one or more packages.

Parameters

  • ...: List of packages to install

Return values:

  1. Boolean indicating the status of the action
  2. OPKG return code, STDOUT and STDERR
installed (pkg)
Determine whether a given package is installed.

Parameters

  • pkg: Package

Return value:

Boolean
list_all (pat, cb)
List all packages known to opkg.

Parameters

  • pat: Only find packages matching this pattern, nil lists all packages
  • cb: Callback function invoked for each package, receives name, version and description as arguments

Return value:

nothing
list_installed (pat, cb)
List installed packages.

Parameters

  • pat: Only find packages matching this pattern, nil lists all packages
  • cb: Callback function invoked for each package, receives name, version and description as arguments

Return value:

nothing
overlay_root ()
Determines the overlay root used by opkg.

Return value:

String containing the directory path of the overlay root.
remove (...)
Remove one or more packages.

Parameters

  • ...: List of packages to install

Return values:

  1. Boolean indicating the status of the action
  2. OPKG return code, STDOUT and STDERR
status (pkg)
Return the package status of one or more packages.

Parameters

  • pkg: Limit output to a (set of) packages

Return value:

Table containing package status information
update ()
Update package lists.

Return values:

  1. Boolean indicating the status of the action
  2. OPKG return code, STDOUT and STDERR
upgrade ()
Upgrades all installed packages.

Return values:

  1. Boolean indicating the status of the action
  2. OPKG return code, STDOUT and STDERR

Valid XHTML 1.0!