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