luci.model.ipkg.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <title>Reference</title>
  6. <link rel="stylesheet" href="../luadoc.css" type="text/css" />
  7. <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <div id="navigation">
  18. <h1>LuaDoc</h1>
  19. <ul>
  20. <li><a href="../index.html">Index</a></li>
  21. </ul>
  22. <!-- Module list -->
  23. <h1>Modules</h1>
  24. <ul>
  25. <li>
  26. <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
  27. </li>
  28. <li>
  29. <a href="../modules/luci.http.html">luci.http</a>
  30. </li>
  31. <li>
  32. <a href="../modules/luci.http.protocol.html">luci.http.protocol</a>
  33. </li>
  34. <li>
  35. <a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
  36. </li>
  37. <li>
  38. <a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
  39. </li>
  40. <li>
  41. <a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.mime</a>
  42. </li>
  43. <li>
  44. <a href="../modules/luci.i18n.html">luci.i18n</a>
  45. </li>
  46. <li>
  47. <a href="../modules/luci.ip.html">luci.ip</a>
  48. </li>
  49. <li>
  50. <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
  51. </li>
  52. <li>
  53. <a href="../modules/luci.json.html">luci.json</a>
  54. </li>
  55. <li>
  56. <a href="../modules/luci.jsonc.html">luci.jsonc</a>
  57. </li>
  58. <li>
  59. <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
  60. </li>
  61. <li><strong>luci.model.ipkg</strong></li>
  62. <li>
  63. <a href="../modules/luci.model.uci.html">luci.model.uci</a>
  64. </li>
  65. <li>
  66. <a href="../modules/luci.rpcc.html">luci.rpcc</a>
  67. </li>
  68. <li>
  69. <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
  70. </li>
  71. <li>
  72. <a href="../modules/luci.sys.html">luci.sys</a>
  73. </li>
  74. <li>
  75. <a href="../modules/luci.sys.init.html">luci.sys.init</a>
  76. </li>
  77. <li>
  78. <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
  79. </li>
  80. <li>
  81. <a href="../modules/luci.sys.net.html">luci.sys.net</a>
  82. </li>
  83. <li>
  84. <a href="../modules/luci.sys.process.html">luci.sys.process</a>
  85. </li>
  86. <li>
  87. <a href="../modules/luci.sys.user.html">luci.sys.user</a>
  88. </li>
  89. <li>
  90. <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
  91. </li>
  92. <li>
  93. <a href="../modules/luci.util.html">luci.util</a>
  94. </li>
  95. <li>
  96. <a href="../modules/nixio.html">nixio</a>
  97. </li>
  98. <li>
  99. <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
  100. </li>
  101. <li>
  102. <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
  103. </li>
  104. <li>
  105. <a href="../modules/nixio.File.html">nixio.File</a>
  106. </li>
  107. <li>
  108. <a href="../modules/nixio.README.html">nixio.README</a>
  109. </li>
  110. <li>
  111. <a href="../modules/nixio.Socket.html">nixio.Socket</a>
  112. </li>
  113. <li>
  114. <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
  115. </li>
  116. <li>
  117. <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
  118. </li>
  119. <li>
  120. <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
  121. </li>
  122. <li>
  123. <a href="../modules/nixio.bin.html">nixio.bin</a>
  124. </li>
  125. <li>
  126. <a href="../modules/nixio.bit.html">nixio.bit</a>
  127. </li>
  128. <li>
  129. <a href="../modules/nixio.crypto.html">nixio.crypto</a>
  130. </li>
  131. <li>
  132. <a href="../modules/nixio.fs.html">nixio.fs</a>
  133. </li>
  134. </ul>
  135. <!-- File list -->
  136. </div><!-- id="navigation" -->
  137. <div id="content">
  138. <h1>Class <code>luci.model.ipkg</code></h1>
  139. <p></p>
  140. <h2>Functions</h2>
  141. <table class="function_list">
  142. <tr>
  143. <td class="name" nowrap><a href="#compare_versions">compare_versions</a>&nbsp;(ver1, ver2, comp)</td>
  144. <td class="summary">
  145. lua version of opkg compare-versions
  146. </td>
  147. </tr>
  148. <tr>
  149. <td class="name" nowrap><a href="#find">find</a>&nbsp;(pat, cb)</td>
  150. <td class="summary">
  151. Find packages that match the given pattern.</td>
  152. </tr>
  153. <tr>
  154. <td class="name" nowrap><a href="#info">info</a>&nbsp;(pkg)</td>
  155. <td class="summary">
  156. Return information about installed and available packages.</td>
  157. </tr>
  158. <tr>
  159. <td class="name" nowrap><a href="#install">install</a>&nbsp;(...)</td>
  160. <td class="summary">
  161. Install one or more packages.</td>
  162. </tr>
  163. <tr>
  164. <td class="name" nowrap><a href="#installed">installed</a>&nbsp;(pkg)</td>
  165. <td class="summary">
  166. Determine whether a given package is installed.</td>
  167. </tr>
  168. <tr>
  169. <td class="name" nowrap><a href="#list_all">list_all</a>&nbsp;(pat, cb)</td>
  170. <td class="summary">
  171. List all packages known to opkg.</td>
  172. </tr>
  173. <tr>
  174. <td class="name" nowrap><a href="#list_installed">list_installed</a>&nbsp;(pat, cb)</td>
  175. <td class="summary">
  176. List installed packages.</td>
  177. </tr>
  178. <tr>
  179. <td class="name" nowrap><a href="#overlay_root">overlay_root</a>&nbsp;()</td>
  180. <td class="summary">
  181. Determines the overlay root used by opkg.</td>
  182. </tr>
  183. <tr>
  184. <td class="name" nowrap><a href="#remove">remove</a>&nbsp;(...)</td>
  185. <td class="summary">
  186. Remove one or more packages.</td>
  187. </tr>
  188. <tr>
  189. <td class="name" nowrap><a href="#status">status</a>&nbsp;(pkg)</td>
  190. <td class="summary">
  191. Return the package status of one or more packages.</td>
  192. </tr>
  193. <tr>
  194. <td class="name" nowrap><a href="#update">update</a>&nbsp;()</td>
  195. <td class="summary">
  196. Update package lists.</td>
  197. </tr>
  198. <tr>
  199. <td class="name" nowrap><a href="#upgrade">upgrade</a>&nbsp;()</td>
  200. <td class="summary">
  201. Upgrades all installed packages.</td>
  202. </tr>
  203. </table>
  204. <br/>
  205. <br/>
  206. <h2><a name="functions"></a>Functions</h2>
  207. <dl class="function">
  208. <dt><a name="compare_versions"></a><strong>compare_versions</strong>&nbsp;(ver1, ver2, comp)</dt>
  209. <dd>
  210. lua version of opkg compare-versions
  211. <h3>Parameters</h3>
  212. <ul>
  213. <li>
  214. ver1: string version 1
  215. </li>
  216. <li>
  217. ver2: string version 2
  218. </li>
  219. <li>
  220. comp: string compare versions using
  221. "<=" or "<" lower-equal
  222. ">" or ">=" greater-equal
  223. "=" equal
  224. "<<" lower
  225. ">>" greater
  226. "~=" not equal
  227. </li>
  228. </ul>
  229. <h3>Return value:</h3>
  230. Boolean indicating the status of the compare
  231. </dd>
  232. <dt><a name="find"></a><strong>find</strong>&nbsp;(pat, cb)</dt>
  233. <dd>
  234. Find packages that match the given pattern.
  235. <h3>Parameters</h3>
  236. <ul>
  237. <li>
  238. pat: Find packages whose names or descriptions match this pattern, nil results in zero results
  239. </li>
  240. <li>
  241. cb: Callback function invoked for each patckage, receives name, version and description as arguments
  242. </li>
  243. </ul>
  244. <h3>Return value:</h3>
  245. nothing
  246. </dd>
  247. <dt><a name="info"></a><strong>info</strong>&nbsp;(pkg)</dt>
  248. <dd>
  249. Return information about installed and available packages.
  250. <h3>Parameters</h3>
  251. <ul>
  252. <li>
  253. pkg: Limit output to a (set of) packages
  254. </li>
  255. </ul>
  256. <h3>Return value:</h3>
  257. Table containing package information
  258. </dd>
  259. <dt><a name="install"></a><strong>install</strong>&nbsp;(...)</dt>
  260. <dd>
  261. Install one or more packages.
  262. <h3>Parameters</h3>
  263. <ul>
  264. <li>
  265. ...: List of packages to install
  266. </li>
  267. </ul>
  268. <h3>Return values:</h3>
  269. <ol>
  270. <li>Boolean indicating the status of the action
  271. <li>OPKG return code, STDOUT and STDERR
  272. </ol>
  273. </dd>
  274. <dt><a name="installed"></a><strong>installed</strong>&nbsp;(pkg)</dt>
  275. <dd>
  276. Determine whether a given package is installed.
  277. <h3>Parameters</h3>
  278. <ul>
  279. <li>
  280. pkg: Package
  281. </li>
  282. </ul>
  283. <h3>Return value:</h3>
  284. Boolean
  285. </dd>
  286. <dt><a name="list_all"></a><strong>list_all</strong>&nbsp;(pat, cb)</dt>
  287. <dd>
  288. List all packages known to opkg.
  289. <h3>Parameters</h3>
  290. <ul>
  291. <li>
  292. pat: Only find packages matching this pattern, nil lists all packages
  293. </li>
  294. <li>
  295. cb: Callback function invoked for each package, receives name, version and description as arguments
  296. </li>
  297. </ul>
  298. <h3>Return value:</h3>
  299. nothing
  300. </dd>
  301. <dt><a name="list_installed"></a><strong>list_installed</strong>&nbsp;(pat, cb)</dt>
  302. <dd>
  303. List installed packages.
  304. <h3>Parameters</h3>
  305. <ul>
  306. <li>
  307. pat: Only find packages matching this pattern, nil lists all packages
  308. </li>
  309. <li>
  310. cb: Callback function invoked for each package, receives name, version and description as arguments
  311. </li>
  312. </ul>
  313. <h3>Return value:</h3>
  314. nothing
  315. </dd>
  316. <dt><a name="overlay_root"></a><strong>overlay_root</strong>&nbsp;()</dt>
  317. <dd>
  318. Determines the overlay root used by opkg.
  319. <h3>Return value:</h3>
  320. String containing the directory path of the overlay root.
  321. </dd>
  322. <dt><a name="remove"></a><strong>remove</strong>&nbsp;(...)</dt>
  323. <dd>
  324. Remove one or more packages.
  325. <h3>Parameters</h3>
  326. <ul>
  327. <li>
  328. ...: List of packages to install
  329. </li>
  330. </ul>
  331. <h3>Return values:</h3>
  332. <ol>
  333. <li>Boolean indicating the status of the action
  334. <li>OPKG return code, STDOUT and STDERR
  335. </ol>
  336. </dd>
  337. <dt><a name="status"></a><strong>status</strong>&nbsp;(pkg)</dt>
  338. <dd>
  339. Return the package status of one or more packages.
  340. <h3>Parameters</h3>
  341. <ul>
  342. <li>
  343. pkg: Limit output to a (set of) packages
  344. </li>
  345. </ul>
  346. <h3>Return value:</h3>
  347. Table containing package status information
  348. </dd>
  349. <dt><a name="update"></a><strong>update</strong>&nbsp;()</dt>
  350. <dd>
  351. Update package lists.
  352. <h3>Return values:</h3>
  353. <ol>
  354. <li>Boolean indicating the status of the action
  355. <li>OPKG return code, STDOUT and STDERR
  356. </ol>
  357. </dd>
  358. <dt><a name="upgrade"></a><strong>upgrade</strong>&nbsp;()</dt>
  359. <dd>
  360. Upgrades all installed packages.
  361. <h3>Return values:</h3>
  362. <ol>
  363. <li>Boolean indicating the status of the action
  364. <li>OPKG return code, STDOUT and STDERR
  365. </ol>
  366. </dd>
  367. </dl>
  368. </div> <!-- id="content" -->
  369. </div> <!-- id="main" -->
  370. <div id="about">
  371. <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
  372. </div> <!-- id="about" -->
  373. </div> <!-- id="container" -->
  374. </body>
  375. </html>