1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
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"/-->
14 <div id=
"product_logo"></div>
15 <div id=
"product_name"><big><b></b></big></div>
16 <div id=
"product_description"></div>
17 </div> <!-- id="product" -->
27 <li><a href=
"../index.html">Index
</a></li>
38 <a href=
"../modules/luci.dispatcher.html">luci.dispatcher
</a>
42 <a href=
"../modules/luci.http.html">luci.http
</a>
46 <a href=
"../modules/luci.http.conditionals.html">luci.http.conditionals
</a>
50 <a href=
"../modules/luci.http.date.html">luci.http.date
</a>
54 <a href=
"../modules/luci.http.mime.html">luci.http.mime
</a>
58 <a href=
"../modules/luci.i18n.html">luci.i18n
</a>
62 <a href=
"../modules/luci.ip.html">luci.ip
</a>
66 <a href=
"../modules/luci.ip.cidr.html">luci.ip.cidr
</a>
70 <a href=
"../modules/luci.json.html">luci.json
</a>
74 <a href=
"../modules/luci.jsonc.html">luci.jsonc
</a>
78 <a href=
"../modules/luci.jsonc.parser.html">luci.jsonc.parser
</a>
81 <li><strong>luci.model.ipkg
</strong></li>
84 <a href=
"../modules/luci.model.uci.html">luci.model.uci
</a>
88 <a href=
"../modules/luci.rpcc.html">luci.rpcc
</a>
92 <a href=
"../modules/luci.rpcc.ruci.html">luci.rpcc.ruci
</a>
96 <a href=
"../modules/luci.sys.html">luci.sys
</a>
100 <a href=
"../modules/luci.sys.init.html">luci.sys.init
</a>
104 <a href=
"../modules/luci.sys.iptparser.html">luci.sys.iptparser
</a>
108 <a href=
"../modules/luci.sys.net.html">luci.sys.net
</a>
112 <a href=
"../modules/luci.sys.process.html">luci.sys.process
</a>
116 <a href=
"../modules/luci.sys.user.html">luci.sys.user
</a>
120 <a href=
"../modules/luci.sys.wifi.html">luci.sys.wifi
</a>
124 <a href=
"../modules/luci.util.html">luci.util
</a>
128 <a href=
"../modules/nixio.html">nixio
</a>
132 <a href=
"../modules/nixio.CHANGELOG.html">nixio.CHANGELOG
</a>
136 <a href=
"../modules/nixio.CryptoHash.html">nixio.CryptoHash
</a>
140 <a href=
"../modules/nixio.File.html">nixio.File
</a>
144 <a href=
"../modules/nixio.README.html">nixio.README
</a>
148 <a href=
"../modules/nixio.Socket.html">nixio.Socket
</a>
152 <a href=
"../modules/nixio.TLSContext.html">nixio.TLSContext
</a>
156 <a href=
"../modules/nixio.TLSSocket.html">nixio.TLSSocket
</a>
160 <a href=
"../modules/nixio.UnifiedIO.html">nixio.UnifiedIO
</a>
164 <a href=
"../modules/nixio.bin.html">nixio.bin
</a>
168 <a href=
"../modules/nixio.bit.html">nixio.bit
</a>
172 <a href=
"../modules/nixio.crypto.html">nixio.crypto
</a>
176 <a href=
"../modules/nixio.fs.html">nixio.fs
</a>
191 </div><!-- id="navigation" -->
195 <h1>Class
<code>luci.model.ipkg
</code></h1>
206 <table class=
"function_list">
209 <td class=
"name" nowrap
><a href=
"#compare_versions">compare_versions
</a> (ver1, ver2, comp)
</td>
212 lua version of opkg compare-versions
217 <td class=
"name" nowrap
><a href=
"#find">find
</a> (pat, cb)
</td>
220 Find packages that match the given pattern.
</td>
224 <td class=
"name" nowrap
><a href=
"#info">info
</a> (pkg)
</td>
227 Return information about installed and available packages.
</td>
231 <td class=
"name" nowrap
><a href=
"#install">install
</a> (...)
</td>
234 Install one or more packages.
</td>
238 <td class=
"name" nowrap
><a href=
"#installed">installed
</a> (pkg)
</td>
241 Determine whether a given package is installed.
</td>
245 <td class=
"name" nowrap
><a href=
"#list_all">list_all
</a> (pat, cb)
</td>
248 List all packages known to opkg.
</td>
252 <td class=
"name" nowrap
><a href=
"#list_installed">list_installed
</a> (pat, cb)
</td>
255 List installed packages.
</td>
259 <td class=
"name" nowrap
><a href=
"#overlay_root">overlay_root
</a> ()
</td>
262 Determines the overlay root used by opkg.
</td>
266 <td class=
"name" nowrap
><a href=
"#remove">remove
</a> (...)
</td>
269 Remove one or more packages.
</td>
273 <td class=
"name" nowrap
><a href=
"#status">status
</a> (pkg)
</td>
276 Return the package status of one or more packages.
</td>
280 <td class=
"name" nowrap
><a href=
"#update">update
</a> ()
</td>
283 Update package lists.
</td>
287 <td class=
"name" nowrap
><a href=
"#upgrade">upgrade
</a> ()
</td>
290 Upgrades all installed packages.
</td>
304 <h2><a name=
"functions"></a>Functions
</h2>
305 <dl class=
"function">
309 <dt><a name=
"compare_versions"></a><strong>compare_versions
</strong> (ver1, ver2, comp)
</dt>
313 lua version of opkg compare-versions
321 ver1: string version
1
325 ver2: string version
2
329 comp: string compare versions using
330 "<=" or
"<" lower-equal
331 ">" or
">=" greater-equal
345 <h3>Return value:
</h3>
346 Boolean indicating the status of the compare
355 <dt><a name=
"find"></a><strong>find
</strong> (pat, cb)
</dt>
359 Find packages that match the given pattern.
367 pat: Find packages whose names or descriptions match this pattern, nil results in zero results
371 cb: Callback function invoked for each patckage, receives name, version and description as arguments
381 <h3>Return value:
</h3>
391 <dt><a name=
"info"></a><strong>info
</strong> (pkg)
</dt>
395 Return information about installed and available packages.
403 pkg: Limit output to a (set of) packages
413 <h3>Return value:
</h3>
414 Table containing package information
423 <dt><a name=
"install"></a><strong>install
</strong> (...)
</dt>
427 Install one or more packages.
435 ...: List of packages to install
445 <h3>Return values:
</h3>
448 <li>Boolean indicating the status of the action
450 <li>OPKG return code, STDOUT and STDERR
461 <dt><a name=
"installed"></a><strong>installed
</strong> (pkg)
</dt>
465 Determine whether a given package is installed.
483 <h3>Return value:
</h3>
493 <dt><a name=
"list_all"></a><strong>list_all
</strong> (pat, cb)
</dt>
497 List all packages known to opkg.
505 pat: Only find packages matching this pattern, nil lists all packages
509 cb: Callback function invoked for each package, receives name, version and description as arguments
519 <h3>Return value:
</h3>
529 <dt><a name=
"list_installed"></a><strong>list_installed
</strong> (pat, cb)
</dt>
533 List installed packages.
541 pat: Only find packages matching this pattern, nil lists all packages
545 cb: Callback function invoked for each package, receives name, version and description as arguments
555 <h3>Return value:
</h3>
565 <dt><a name=
"overlay_root"></a><strong>overlay_root
</strong> ()
</dt>
569 Determines the overlay root used by opkg.
578 <h3>Return value:
</h3>
579 String containing the directory path of the overlay root.
588 <dt><a name=
"remove"></a><strong>remove
</strong> (...)
</dt>
592 Remove one or more packages.
600 ...: List of packages to install
610 <h3>Return values:
</h3>
613 <li>Boolean indicating the status of the action
615 <li>OPKG return code, STDOUT and STDERR
626 <dt><a name=
"status"></a><strong>status
</strong> (pkg)
</dt>
630 Return the package status of one or more packages.
638 pkg: Limit output to a (set of) packages
648 <h3>Return value:
</h3>
649 Table containing package status information
658 <dt><a name=
"update"></a><strong>update
</strong> ()
</dt>
662 Update package lists.
671 <h3>Return values:
</h3>
674 <li>Boolean indicating the status of the action
676 <li>OPKG return code, STDOUT and STDERR
687 <dt><a name=
"upgrade"></a><strong>upgrade
</strong> ()
</dt>
691 Upgrades all installed packages.
700 <h3>Return values:
</h3>
703 <li>Boolean indicating the status of the action
705 <li>OPKG return code, STDOUT and STDERR
720 </div> <!-- id="content" -->
722 </div> <!-- id="main" -->
725 <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>
726 </div> <!-- id="about" -->
728 </div> <!-- id="container" -->