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/luci.xml.html">luci.xml
</a>
132 <a href=
"../modules/nixio.html">nixio
</a>
136 <a href=
"../modules/nixio.CHANGELOG.html">nixio.CHANGELOG
</a>
140 <a href=
"../modules/nixio.CryptoHash.html">nixio.CryptoHash
</a>
144 <a href=
"../modules/nixio.File.html">nixio.File
</a>
148 <a href=
"../modules/nixio.README.html">nixio.README
</a>
152 <a href=
"../modules/nixio.Socket.html">nixio.Socket
</a>
156 <a href=
"../modules/nixio.TLSContext.html">nixio.TLSContext
</a>
160 <a href=
"../modules/nixio.TLSSocket.html">nixio.TLSSocket
</a>
164 <a href=
"../modules/nixio.UnifiedIO.html">nixio.UnifiedIO
</a>
168 <a href=
"../modules/nixio.bin.html">nixio.bin
</a>
172 <a href=
"../modules/nixio.bit.html">nixio.bit
</a>
176 <a href=
"../modules/nixio.crypto.html">nixio.crypto
</a>
180 <a href=
"../modules/nixio.fs.html">nixio.fs
</a>
195 </div><!-- id="navigation" -->
199 <h1>Class
<code>luci.model.ipkg
</code></h1>
210 <table class=
"function_list">
213 <td class=
"name" nowrap
><a href=
"#compare_versions">compare_versions
</a> (ver1, ver2, comp)
</td>
216 lua version of opkg compare-versions
221 <td class=
"name" nowrap
><a href=
"#find">find
</a> (pat, cb)
</td>
224 Find packages that match the given pattern.
</td>
228 <td class=
"name" nowrap
><a href=
"#info">info
</a> (pkg)
</td>
231 Return information about installed and available packages.
</td>
235 <td class=
"name" nowrap
><a href=
"#install">install
</a> (...)
</td>
238 Install one or more packages.
</td>
242 <td class=
"name" nowrap
><a href=
"#installed">installed
</a> (pkg)
</td>
245 Determine whether a given package is installed.
</td>
249 <td class=
"name" nowrap
><a href=
"#list_all">list_all
</a> (pat, cb)
</td>
252 List all packages known to opkg.
</td>
256 <td class=
"name" nowrap
><a href=
"#list_installed">list_installed
</a> (pat, cb)
</td>
259 List installed packages.
</td>
263 <td class=
"name" nowrap
><a href=
"#overlay_root">overlay_root
</a> ()
</td>
266 Determines the overlay root used by opkg.
</td>
270 <td class=
"name" nowrap
><a href=
"#remove">remove
</a> (...)
</td>
273 Remove one or more packages.
</td>
277 <td class=
"name" nowrap
><a href=
"#status">status
</a> (pkg)
</td>
280 Return the package status of one or more packages.
</td>
284 <td class=
"name" nowrap
><a href=
"#update">update
</a> ()
</td>
287 Update package lists.
</td>
291 <td class=
"name" nowrap
><a href=
"#upgrade">upgrade
</a> ()
</td>
294 Upgrades all installed packages.
</td>
308 <h2><a name=
"functions"></a>Functions
</h2>
309 <dl class=
"function">
313 <dt><a name=
"compare_versions"></a><strong>compare_versions
</strong> (ver1, ver2, comp)
</dt>
317 lua version of opkg compare-versions
325 ver1: string version
1
329 ver2: string version
2
333 comp: string compare versions using
334 "<=" or
"<" lower-equal
335 ">" or
">=" greater-equal
349 <h3>Return value:
</h3>
350 Boolean indicating the status of the compare
359 <dt><a name=
"find"></a><strong>find
</strong> (pat, cb)
</dt>
363 Find packages that match the given pattern.
371 pat: Find packages whose names or descriptions match this pattern, nil results in zero results
375 cb: Callback function invoked for each patckage, receives name, version and description as arguments
385 <h3>Return value:
</h3>
395 <dt><a name=
"info"></a><strong>info
</strong> (pkg)
</dt>
399 Return information about installed and available packages.
407 pkg: Limit output to a (set of) packages
417 <h3>Return value:
</h3>
418 Table containing package information
427 <dt><a name=
"install"></a><strong>install
</strong> (...)
</dt>
431 Install one or more packages.
439 ...: List of packages to install
449 <h3>Return values:
</h3>
452 <li>Boolean indicating the status of the action
454 <li>OPKG return code, STDOUT and STDERR
465 <dt><a name=
"installed"></a><strong>installed
</strong> (pkg)
</dt>
469 Determine whether a given package is installed.
487 <h3>Return value:
</h3>
497 <dt><a name=
"list_all"></a><strong>list_all
</strong> (pat, cb)
</dt>
501 List all packages known to opkg.
509 pat: Only find packages matching this pattern, nil lists all packages
513 cb: Callback function invoked for each package, receives name, version and description as arguments
523 <h3>Return value:
</h3>
533 <dt><a name=
"list_installed"></a><strong>list_installed
</strong> (pat, cb)
</dt>
537 List installed packages.
545 pat: Only find packages matching this pattern, nil lists all packages
549 cb: Callback function invoked for each package, receives name, version and description as arguments
559 <h3>Return value:
</h3>
569 <dt><a name=
"overlay_root"></a><strong>overlay_root
</strong> ()
</dt>
573 Determines the overlay root used by opkg.
582 <h3>Return value:
</h3>
583 String containing the directory path of the overlay root.
592 <dt><a name=
"remove"></a><strong>remove
</strong> (...)
</dt>
596 Remove one or more packages.
604 ...: List of packages to install
614 <h3>Return values:
</h3>
617 <li>Boolean indicating the status of the action
619 <li>OPKG return code, STDOUT and STDERR
630 <dt><a name=
"status"></a><strong>status
</strong> (pkg)
</dt>
634 Return the package status of one or more packages.
642 pkg: Limit output to a (set of) packages
652 <h3>Return value:
</h3>
653 Table containing package status information
662 <dt><a name=
"update"></a><strong>update
</strong> ()
</dt>
666 Update package lists.
675 <h3>Return values:
</h3>
678 <li>Boolean indicating the status of the action
680 <li>OPKG return code, STDOUT and STDERR
691 <dt><a name=
"upgrade"></a><strong>upgrade
</strong> ()
</dt>
695 Upgrades all installed packages.
704 <h3>Return values:
</h3>
707 <li>Boolean indicating the status of the action
709 <li>OPKG return code, STDOUT and STDERR
724 </div> <!-- id="content" -->
726 </div> <!-- id="main" -->
729 <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>
730 </div> <!-- id="about" -->
732 </div> <!-- id="container" -->