Merge pull request #1690 from karlp/pagekite
[project/luci.git] / documentation / api / modules / luci.model.ipkg.html
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
10 <body>
11 <div id="container">
12
13 <div id="product">
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" -->
18
19 <div id="main">
20
21 <div id="navigation">
22
23
24 <h1>LuaDoc</h1>
25 <ul>
26         
27         <li><a href="../index.html">Index</a></li>
28         
29 </ul>
30
31
32 <!-- Module list -->
33
34 <h1>Modules</h1>
35 <ul>
36
37         <li>
38                 <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
39         </li>
40
41         <li>
42                 <a href="../modules/luci.http.html">luci.http</a>
43         </li>
44
45         <li>
46                 <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
47         </li>
48
49         <li>
50                 <a href="../modules/luci.http.date.html">luci.http.date</a>
51         </li>
52
53         <li>
54                 <a href="../modules/luci.http.mime.html">luci.http.mime</a>
55         </li>
56
57         <li>
58                 <a href="../modules/luci.i18n.html">luci.i18n</a>
59         </li>
60
61         <li>
62                 <a href="../modules/luci.ip.html">luci.ip</a>
63         </li>
64
65         <li>
66                 <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
67         </li>
68
69         <li>
70                 <a href="../modules/luci.json.html">luci.json</a>
71         </li>
72
73         <li>
74                 <a href="../modules/luci.jsonc.html">luci.jsonc</a>
75         </li>
76
77         <li>
78                 <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
79         </li>
80
81         <li><strong>luci.model.ipkg</strong></li>
82         
83         <li>
84                 <a href="../modules/luci.model.uci.html">luci.model.uci</a>
85         </li>
86
87         <li>
88                 <a href="../modules/luci.rpcc.html">luci.rpcc</a>
89         </li>
90
91         <li>
92                 <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
93         </li>
94
95         <li>
96                 <a href="../modules/luci.sys.html">luci.sys</a>
97         </li>
98
99         <li>
100                 <a href="../modules/luci.sys.init.html">luci.sys.init</a>
101         </li>
102
103         <li>
104                 <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
105         </li>
106
107         <li>
108                 <a href="../modules/luci.sys.net.html">luci.sys.net</a>
109         </li>
110
111         <li>
112                 <a href="../modules/luci.sys.process.html">luci.sys.process</a>
113         </li>
114
115         <li>
116                 <a href="../modules/luci.sys.user.html">luci.sys.user</a>
117         </li>
118
119         <li>
120                 <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
121         </li>
122
123         <li>
124                 <a href="../modules/luci.util.html">luci.util</a>
125         </li>
126
127         <li>
128                 <a href="../modules/nixio.html">nixio</a>
129         </li>
130
131         <li>
132                 <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
133         </li>
134
135         <li>
136                 <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
137         </li>
138
139         <li>
140                 <a href="../modules/nixio.File.html">nixio.File</a>
141         </li>
142
143         <li>
144                 <a href="../modules/nixio.README.html">nixio.README</a>
145         </li>
146
147         <li>
148                 <a href="../modules/nixio.Socket.html">nixio.Socket</a>
149         </li>
150
151         <li>
152                 <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
153         </li>
154
155         <li>
156                 <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
157         </li>
158
159         <li>
160                 <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
161         </li>
162
163         <li>
164                 <a href="../modules/nixio.bin.html">nixio.bin</a>
165         </li>
166
167         <li>
168                 <a href="../modules/nixio.bit.html">nixio.bit</a>
169         </li>
170
171         <li>
172                 <a href="../modules/nixio.crypto.html">nixio.crypto</a>
173         </li>
174
175         <li>
176                 <a href="../modules/nixio.fs.html">nixio.fs</a>
177         </li>
178
179 </ul>
180
181
182
183 <!-- File list -->
184
185
186
187
188
189
190
191 </div><!-- id="navigation" -->
192
193 <div id="content">
194
195 <h1>Class <code>luci.model.ipkg</code></h1>
196
197 <p></p>
198
199
200
201
202
203
204
205 <h2>Functions</h2>
206 <table class="function_list">
207
208         <tr>
209         <td class="name" nowrap><a href="#compare_versions">compare_versions</a>&nbsp;(ver1, ver2, comp)</td>
210         <td class="summary">
211  
212 lua version of opkg compare-versions 
213  </td>
214         </tr>
215
216         <tr>
217         <td class="name" nowrap><a href="#find">find</a>&nbsp;(pat, cb)</td>
218         <td class="summary">
219  
220 Find packages that match the given pattern.</td>
221         </tr>
222
223         <tr>
224         <td class="name" nowrap><a href="#info">info</a>&nbsp;(pkg)</td>
225         <td class="summary">
226  
227 Return information about installed and available packages.</td>
228         </tr>
229
230         <tr>
231         <td class="name" nowrap><a href="#install">install</a>&nbsp;(...)</td>
232         <td class="summary">
233  
234 Install one or more packages.</td>
235         </tr>
236
237         <tr>
238         <td class="name" nowrap><a href="#installed">installed</a>&nbsp;(pkg)</td>
239         <td class="summary">
240  
241 Determine whether a given package is installed.</td>
242         </tr>
243
244         <tr>
245         <td class="name" nowrap><a href="#list_all">list_all</a>&nbsp;(pat, cb)</td>
246         <td class="summary">
247  
248 List all packages known to opkg.</td>
249         </tr>
250
251         <tr>
252         <td class="name" nowrap><a href="#list_installed">list_installed</a>&nbsp;(pat, cb)</td>
253         <td class="summary">
254  
255 List installed packages.</td>
256         </tr>
257
258         <tr>
259         <td class="name" nowrap><a href="#overlay_root">overlay_root</a>&nbsp;()</td>
260         <td class="summary">
261  
262 Determines the overlay root used by opkg.</td>
263         </tr>
264
265         <tr>
266         <td class="name" nowrap><a href="#remove">remove</a>&nbsp;(...)</td>
267         <td class="summary">
268  
269 Remove one or more packages.</td>
270         </tr>
271
272         <tr>
273         <td class="name" nowrap><a href="#status">status</a>&nbsp;(pkg)</td>
274         <td class="summary">
275  
276 Return the package status of one or more packages.</td>
277         </tr>
278
279         <tr>
280         <td class="name" nowrap><a href="#update">update</a>&nbsp;()</td>
281         <td class="summary">
282  
283 Update package lists.</td>
284         </tr>
285
286         <tr>
287         <td class="name" nowrap><a href="#upgrade">upgrade</a>&nbsp;()</td>
288         <td class="summary">
289  
290 Upgrades all installed packages.</td>
291         </tr>
292
293 </table>
294
295
296
297
298
299
300 <br/>
301 <br/>
302
303
304 <h2><a name="functions"></a>Functions</h2>
305 <dl class="function">
306
307
308
309 <dt><a name="compare_versions"></a><strong>compare_versions</strong>&nbsp;(ver1, ver2, comp)</dt>
310 <dd>
311
312  
313 lua version of opkg compare-versions 
314
315
316
317 <h3>Parameters</h3>
318 <ul>
319         
320         <li>
321           ver1: string version 1
322         </li>
323         
324         <li>
325           ver2: string version 2
326         </li>
327         
328         <li>
329           comp: string compare versions using 
330                 "<=" or "<" lower-equal 
331                 ">" or ">=" greater-equal 
332                 "=" equal 
333                 "<<" lower 
334                 ">>" greater 
335                 "~=" not equal
336         </li>
337         
338 </ul>
339
340
341
342
343
344
345 <h3>Return value:</h3>
346 Boolean indicating the status of the compare
347
348
349
350 </dd>
351
352
353
354
355 <dt><a name="find"></a><strong>find</strong>&nbsp;(pat, cb)</dt>
356 <dd>
357
358  
359 Find packages that match the given pattern. 
360
361
362
363 <h3>Parameters</h3>
364 <ul>
365         
366         <li>
367           pat: Find packages whose names or descriptions match this pattern, nil results in zero results
368         </li>
369         
370         <li>
371           cb: Callback function invoked for each patckage, receives name, version and description as arguments
372         </li>
373         
374 </ul>
375
376
377
378
379
380
381 <h3>Return value:</h3>
382 nothing
383
384
385
386 </dd>
387
388
389
390
391 <dt><a name="info"></a><strong>info</strong>&nbsp;(pkg)</dt>
392 <dd>
393
394  
395 Return information about installed and available packages. 
396
397
398
399 <h3>Parameters</h3>
400 <ul>
401         
402         <li>
403           pkg: Limit output to a (set of) packages
404         </li>
405         
406 </ul>
407
408
409
410
411
412
413 <h3>Return value:</h3>
414 Table containing package information
415
416
417
418 </dd>
419
420
421
422
423 <dt><a name="install"></a><strong>install</strong>&nbsp;(...)</dt>
424 <dd>
425
426  
427 Install one or more packages. 
428
429
430
431 <h3>Parameters</h3>
432 <ul>
433         
434         <li>
435           ...: List of packages to install
436         </li>
437         
438 </ul>
439
440
441
442
443
444
445 <h3>Return values:</h3>
446 <ol>
447         
448         <li>Boolean indicating the status of the action
449         
450         <li>OPKG return code, STDOUT and STDERR
451         
452 </ol>
453
454
455
456 </dd>
457
458
459
460
461 <dt><a name="installed"></a><strong>installed</strong>&nbsp;(pkg)</dt>
462 <dd>
463
464  
465 Determine whether a given package is installed. 
466
467
468
469 <h3>Parameters</h3>
470 <ul>
471         
472         <li>
473           pkg: Package
474         </li>
475         
476 </ul>
477
478
479
480
481
482
483 <h3>Return value:</h3>
484 Boolean
485
486
487
488 </dd>
489
490
491
492
493 <dt><a name="list_all"></a><strong>list_all</strong>&nbsp;(pat, cb)</dt>
494 <dd>
495
496  
497 List all packages known to opkg. 
498
499
500
501 <h3>Parameters</h3>
502 <ul>
503         
504         <li>
505           pat: Only find packages matching this pattern, nil lists all packages
506         </li>
507         
508         <li>
509           cb: Callback function invoked for each package, receives name, version and description as arguments
510         </li>
511         
512 </ul>
513
514
515
516
517
518
519 <h3>Return value:</h3>
520 nothing
521
522
523
524 </dd>
525
526
527
528
529 <dt><a name="list_installed"></a><strong>list_installed</strong>&nbsp;(pat, cb)</dt>
530 <dd>
531
532  
533 List installed packages. 
534
535
536
537 <h3>Parameters</h3>
538 <ul>
539         
540         <li>
541           pat: Only find packages matching this pattern, nil lists all packages
542         </li>
543         
544         <li>
545           cb: Callback function invoked for each package, receives name, version and description as arguments
546         </li>
547         
548 </ul>
549
550
551
552
553
554
555 <h3>Return value:</h3>
556 nothing
557
558
559
560 </dd>
561
562
563
564
565 <dt><a name="overlay_root"></a><strong>overlay_root</strong>&nbsp;()</dt>
566 <dd>
567
568  
569 Determines the overlay root used by opkg. 
570
571
572
573
574
575
576
577
578 <h3>Return value:</h3>
579 String containing the directory path of the overlay root.
580
581
582
583 </dd>
584
585
586
587
588 <dt><a name="remove"></a><strong>remove</strong>&nbsp;(...)</dt>
589 <dd>
590
591  
592 Remove one or more packages. 
593
594
595
596 <h3>Parameters</h3>
597 <ul>
598         
599         <li>
600           ...: List of packages to install
601         </li>
602         
603 </ul>
604
605
606
607
608
609
610 <h3>Return values:</h3>
611 <ol>
612         
613         <li>Boolean indicating the status of the action
614         
615         <li>OPKG return code, STDOUT and STDERR
616         
617 </ol>
618
619
620
621 </dd>
622
623
624
625
626 <dt><a name="status"></a><strong>status</strong>&nbsp;(pkg)</dt>
627 <dd>
628
629  
630 Return the package status of one or more packages. 
631
632
633
634 <h3>Parameters</h3>
635 <ul>
636         
637         <li>
638           pkg: Limit output to a (set of) packages
639         </li>
640         
641 </ul>
642
643
644
645
646
647
648 <h3>Return value:</h3>
649 Table containing package status information
650
651
652
653 </dd>
654
655
656
657
658 <dt><a name="update"></a><strong>update</strong>&nbsp;()</dt>
659 <dd>
660
661  
662 Update package lists. 
663
664
665
666
667
668
669
670
671 <h3>Return values:</h3>
672 <ol>
673         
674         <li>Boolean indicating the status of the action
675         
676         <li>OPKG return code, STDOUT and STDERR
677         
678 </ol>
679
680
681
682 </dd>
683
684
685
686
687 <dt><a name="upgrade"></a><strong>upgrade</strong>&nbsp;()</dt>
688 <dd>
689
690  
691 Upgrades all installed packages. 
692
693
694
695
696
697
698
699
700 <h3>Return values:</h3>
701 <ol>
702         
703         <li>Boolean indicating the status of the action
704         
705         <li>OPKG return code, STDOUT and STDERR
706         
707 </ol>
708
709
710
711 </dd>
712
713
714 </dl>
715
716
717
718
719
720 </div> <!-- id="content" -->
721
722 </div> <!-- id="main" -->
723
724 <div id="about">
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" -->
727
728 </div> <!-- id="container" -->
729 </body>
730 </html>