2
0

ipkg.luadoc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ---[[
  2. LuCI OPKG call abstraction library
  3. ]]
  4. module "luci.model.ipkg"
  5. ---[[
  6. Return information about installed and available packages.
  7. @class function
  8. @name info
  9. @param pkg Limit output to a (set of) packages
  10. @return Table containing package information
  11. ]]
  12. ---[[
  13. Return the package status of one or more packages.
  14. @class function
  15. @name status
  16. @param pkg Limit output to a (set of) packages
  17. @return Table containing package status information
  18. ]]
  19. ---[[
  20. Install one or more packages.
  21. @class function
  22. @name install
  23. @param ... List of packages to install
  24. @return Boolean indicating the status of the action
  25. @return OPKG return code, STDOUT and STDERR
  26. ]]
  27. ---[[
  28. Determine whether a given package is installed.
  29. @class function
  30. @name installed
  31. @param pkg Package
  32. @return Boolean
  33. ]]
  34. ---[[
  35. Remove one or more packages.
  36. @class function
  37. @name remove
  38. @param ... List of packages to install
  39. @return Boolean indicating the status of the action
  40. @return OPKG return code, STDOUT and STDERR
  41. ]]
  42. ---[[
  43. Update package lists.
  44. @class function
  45. @name update
  46. @return Boolean indicating the status of the action
  47. @return OPKG return code, STDOUT and STDERR
  48. ]]
  49. ---[[
  50. Upgrades all installed packages.
  51. @class function
  52. @name upgrade
  53. @return Boolean indicating the status of the action
  54. @return OPKG return code, STDOUT and STDERR
  55. ]]
  56. ---[[
  57. List all packages known to opkg.
  58. @class function
  59. @name list_all
  60. @param pat Only find packages matching this pattern, nil lists all packages
  61. @param cb Callback function invoked for each package, receives name, version and description as arguments
  62. @return nothing
  63. ]]
  64. ---[[
  65. List installed packages.
  66. @class function
  67. @name list_installed
  68. @param pat Only find packages matching this pattern, nil lists all packages
  69. @param cb Callback function invoked for each package, receives name, version and description as arguments
  70. @return nothing
  71. ]]
  72. ---[[
  73. Find packages that match the given pattern.
  74. @class function
  75. @name find
  76. @param pat Find packages whose names or descriptions match this pattern, nil results in zero results
  77. @param cb Callback function invoked for each patckage, receives name, version and description as arguments
  78. @return nothing
  79. ]]
  80. ---[[
  81. Determines the overlay root used by opkg.
  82. @class function
  83. @name overlay_root
  84. @return String containing the directory path of the overlay root.
  85. ]]
  86. ---[[
  87. lua version of opkg compare-versions
  88. @class function
  89. @name compare_versions
  90. @param ver1 string version 1
  91. @param ver2 string version 2
  92. @param comp string compare versions using
  93. "<=" or "<" lower-equal
  94. ">" or ">=" greater-equal
  95. "=" equal
  96. "<<" lower
  97. ">>" greater
  98. "~=" not equal
  99. @return Boolean indicating the status of the compare
  100. ]]