4e1548dda624b89632072986f18dedb197d6be65
[project/luci.git] / modules / luci-base / luasrc / model / ipkg.luadoc
1 ---[[
2 LuCI OPKG call abstraction library
3 ]]
4 module "luci.model.ipkg"
5
6 ---[[
7 Return information about installed and available packages.
8
9 @class function
10 @name info
11 @param pkg Limit output to a (set of) packages
12 @return Table containing package information
13 ]]
14
15 ---[[
16 Return the package status of one or more packages.
17
18 @class function
19 @name status
20 @param pkg Limit output to a (set of) packages
21 @return Table containing package status information
22 ]]
23
24 ---[[
25 Install one or more packages.
26
27 @class function
28 @name install
29 @param ... List of packages to install
30 @return Boolean indicating the status of the action
31 @return OPKG return code, STDOUT and STDERR
32 ]]
33
34 ---[[
35 Determine whether a given package is installed.
36
37 @class function
38 @name installed
39 @param pkg Package
40 @return Boolean
41 ]]
42
43 ---[[
44 Remove one or more packages.
45
46 @class function
47 @name remove
48 @param ... List of packages to install
49 @return Boolean indicating the status of the action
50 @return OPKG return code, STDOUT and STDERR
51 ]]
52
53 ---[[
54 Update package lists.
55
56 @class function
57 @name update
58 @return Boolean indicating the status of the action
59 @return OPKG return code, STDOUT and STDERR
60 ]]
61
62 ---[[
63 Upgrades all installed packages.
64
65 @class function
66 @name upgrade
67 @return Boolean indicating the status of the action
68 @return OPKG return code, STDOUT and STDERR
69 ]]
70
71 ---[[
72 List all packages known to opkg.
73
74 @class function
75 @name list_all
76 @param pat Only find packages matching this pattern, nil lists all packages
77 @param cb Callback function invoked for each package, receives name, version and description as arguments
78 @return nothing
79 ]]
80
81 ---[[
82 List installed packages.
83
84 @class function
85 @name list_installed
86 @param pat Only find packages matching this pattern, nil lists all packages
87 @param cb Callback function invoked for each package, receives name, version and description as arguments
88 @return nothing
89 ]]
90
91 ---[[
92 Find packages that match the given pattern.
93
94 @class function
95 @name find
96 @param pat Find packages whose names or descriptions match this pattern, nil results in zero results
97 @param cb Callback function invoked for each patckage, receives name, version and description as arguments
98 @return nothing
99 ]]
100
101 ---[[
102 Determines the overlay root used by opkg.
103
104 @class function
105 @name overlay_root
106 @return String containing the directory path of the overlay root.
107 ]]
108
109 ---[[
110 lua version of opkg compare-versions
111
112 @class function
113 @name compare_versions
114 @param ver1 string version 1
115 @param ver2 string version 2
116 @param comp string compare versions using
117 "<=" or "<" lower-equal
118 ">" or ">=" greater-equal
119 "=" equal
120 "<<" lower
121 ">>" greater
122 "~=" not equal
123 @return Boolean indicating the status of the compare
124 ]]
125