Tamar 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,197 @@
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/dist.html">dist</a>
39
+ </li>
40
+
41
+ <li>
42
+ <a href="../modules/dist.dep.html">dist.dep</a>
43
+ </li>
44
+
45
+ <li><strong>dist.fetch</strong></li>
46
+
47
+ <li>
48
+ <a href="../modules/dist.log.html">dist.log</a>
49
+ </li>
50
+
51
+ <li>
52
+ <a href="../modules/dist.manifest.html">dist.manifest</a>
53
+ </li>
54
+
55
+ <li>
56
+ <a href="../modules/dist.package.html">dist.package</a>
57
+ </li>
58
+
59
+ <li>
60
+ <a href="../modules/dist.persist.html">dist.persist</a>
61
+ </li>
62
+
63
+ <li>
64
+ <a href="../modules/dist.sys.html">dist.sys</a>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+
70
+
71
+ <!-- File list -->
72
+
73
+
74
+
75
+
76
+
77
+
78
+ </div><!-- id="navigation" -->
79
+
80
+ <div id="content">
81
+
82
+ <h1>Module <code>dist.fetch</code></h1>
83
+
84
+ <p>This module is responsible for downloading contents using URIs. It should handle at least HTTP and FILE URIs as well as system paths transparently. 2DO: support for more protocols if demanded. Two functions are provided. Notice that http requests are cached. download - To download dists. get - To directly obtain manifests.</p>
85
+
86
+
87
+
88
+
89
+
90
+ <h2>Functions</h2>
91
+ <table class="function_list">
92
+
93
+ <tr>
94
+ <td class="name" nowrap><a href="#download">download</a>&nbsp;(src, dest)</td>
95
+ <td class="summary">Fetch file from URI into destination.</td>
96
+ </tr>
97
+
98
+ <tr>
99
+ <td class="name" nowrap><a href="#get">get</a>&nbsp;(src)</td>
100
+ <td class="summary">Directly get file contents from URI using luasocket.</td>
101
+ </tr>
102
+
103
+ </table>
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <br/>
111
+ <br/>
112
+
113
+
114
+
115
+ <h2><a name="functions"></a>Functions</h2>
116
+ <dl class="function">
117
+
118
+
119
+
120
+ <dt><a name="download"></a><strong>download</strong>&nbsp;(src, dest)</dt>
121
+ <dd>
122
+ Fetch file from URI into destination.
123
+
124
+
125
+ <h3>Parameters</h3>
126
+ <ul>
127
+
128
+ <li>
129
+ src: string: URI to fetch file from. Accepts paths too.
130
+ </li>
131
+
132
+ <li>
133
+ dest: string: Destination dir, if not provided temporary dir will be used.
134
+ </li>
135
+
136
+ </ul>
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <h3>Return value:</h3>
144
+ path, log: Path the file was downloaded and the resulting log message.
145
+
146
+
147
+
148
+ </dd>
149
+
150
+
151
+
152
+
153
+ <dt><a name="get"></a><strong>get</strong>&nbsp;(src)</dt>
154
+ <dd>
155
+ Directly get file contents from URI using luasocket.
156
+
157
+
158
+ <h3>Parameters</h3>
159
+ <ul>
160
+
161
+ <li>
162
+ src: string: URI to fetch file from. Accepts paths too.
163
+ </li>
164
+
165
+ </ul>
166
+
167
+
168
+
169
+
170
+
171
+
172
+ <h3>Return value:</h3>
173
+ text, log: Contents of the URL file or nil and log message.
174
+
175
+
176
+
177
+ </dd>
178
+
179
+
180
+ </dl>
181
+
182
+
183
+
184
+
185
+
186
+
187
+ </div> <!-- id="content" -->
188
+
189
+ </div> <!-- id="main" -->
190
+
191
+ <div id="about">
192
+ <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>
193
+ </div> <!-- id="about" -->
194
+
195
+ </div> <!-- id="container" -->
196
+ </body>
197
+ </html>
@@ -0,0 +1,547 @@
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><strong>dist</strong></li>
38
+
39
+ <li>
40
+ <a href="../modules/dist.dep.html">dist.dep</a>
41
+ </li>
42
+
43
+ <li>
44
+ <a href="../modules/dist.fetch.html">dist.fetch</a>
45
+ </li>
46
+
47
+ <li>
48
+ <a href="../modules/dist.log.html">dist.log</a>
49
+ </li>
50
+
51
+ <li>
52
+ <a href="../modules/dist.manifest.html">dist.manifest</a>
53
+ </li>
54
+
55
+ <li>
56
+ <a href="../modules/dist.package.html">dist.package</a>
57
+ </li>
58
+
59
+ <li>
60
+ <a href="../modules/dist.persist.html">dist.persist</a>
61
+ </li>
62
+
63
+ <li>
64
+ <a href="../modules/dist.sys.html">dist.sys</a>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+
70
+
71
+ <!-- File list -->
72
+
73
+
74
+
75
+
76
+
77
+
78
+ </div><!-- id="navigation" -->
79
+
80
+ <div id="content">
81
+
82
+ <h1>Module <code>dist</code></h1>
83
+
84
+ <p>This file contains the basic functions of LuaDist. Feel free to use this exposed API in your projects if you need to deploy something automatically. Please note that everything may change in future releases. Terminology used: _dist_ - General reference to "package" in LuaDist, often synonymous with _info_. _info_ - Meta-data describing a _dist_. Collected from dist.info files inside dist archives. _manifest_ - A collection of sorted _info_ entries in a table. Sorted alphabetically by name and by version descending. _name_ - Refers to a string containing dist name and version constraints. Eg. "lua-5.1.4" or "luajit>=2" _deployment_ - A directory containing dists installed using LuaDist.</p>
85
+
86
+
87
+
88
+
89
+
90
+ <h2>Functions</h2>
91
+ <table class="function_list">
92
+
93
+ <tr>
94
+ <td class="name" nowrap><a href="#deploy">deploy</a>&nbsp;(src, deployment, variables)</td>
95
+ <td class="summary">Deploy a dist directly from source.</td>
96
+ </tr>
97
+
98
+ <tr>
99
+ <td class="name" nowrap><a href="#filterManifest">filterManifest</a>&nbsp;(list, constraints)</td>
100
+ <td class="summary">Filter dist manifests using constraint functions.</td>
101
+ </tr>
102
+
103
+ <tr>
104
+ <td class="name" nowrap><a href="#findDists">findDists</a>&nbsp;(names, manifest, name)</td>
105
+ <td class="summary">Find dists in manifest by name.</td>
106
+ </tr>
107
+
108
+ <tr>
109
+ <td class="name" nowrap><a href="#getDeployed">getDeployed</a>&nbsp;(deployment)</td>
110
+ <td class="summary">Get all deployed dists in the target dir, this will also list dists provided by other dists.</td>
111
+ </tr>
112
+
113
+ <tr>
114
+ <td class="name" nowrap><a href="#getDeployment">getDeployment</a>&nbsp;()</td>
115
+ <td class="summary">Get deployment directory.</td>
116
+ </tr>
117
+
118
+ <tr>
119
+ <td class="name" nowrap><a href="#getDeps">getDeps</a>&nbsp;(names, manifest)</td>
120
+ <td class="summary">Collect dependencies.</td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <td class="name" nowrap><a href="#getInstalled">getInstalled</a>&nbsp;(deployment)</td>
125
+ <td class="summary">Get all installed dists from deployment directory.</td>
126
+ </tr>
127
+
128
+ <tr>
129
+ <td class="name" nowrap><a href="#getManifest">getManifest</a>&nbsp;(repositories)</td>
130
+ <td class="summary">Get contents of repository or a list of repositories.</td>
131
+ </tr>
132
+
133
+ <tr>
134
+ <td class="name" nowrap><a href="#install">install</a>&nbsp;(names, deployment, manifest, variables, name)</td>
135
+ <td class="summary">Install dist by name.</td>
136
+ </tr>
137
+
138
+ <tr>
139
+ <td class="name" nowrap><a href="#pack">pack</a>&nbsp;(names, deployment, dest, dist)</td>
140
+ <td class="summary">Pack a deployed dist.</td>
141
+ </tr>
142
+
143
+ <tr>
144
+ <td class="name" nowrap><a href="#remove">remove</a>&nbsp;(names, deployment, dist)</td>
145
+ <td class="summary">Remove a deployed dist.</td>
146
+ </tr>
147
+
148
+ </table>
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <br/>
156
+ <br/>
157
+
158
+
159
+
160
+ <h2><a name="functions"></a>Functions</h2>
161
+ <dl class="function">
162
+
163
+
164
+
165
+ <dt><a name="deploy"></a><strong>deploy</strong>&nbsp;(src, deployment, variables)</dt>
166
+ <dd>
167
+ Deploy a dist directly from source. _deploy_ will install; and in case of source dists, build a dist from source path. Deployment will automatically fetch from remote URLs and unpack dist or zip files into deploymemt. Variables can contain additional CMake variables to be used when building source dists.
168
+
169
+
170
+ <h3>Parameters</h3>
171
+ <ul>
172
+
173
+ <li>
174
+ src: string: Path to the dist directory to make/deploy or nil to use current directory.
175
+ </li>
176
+
177
+ <li>
178
+ deployment: string: Deployment directory to install the dist into. If nil LuaDist directory is used.
179
+ </li>
180
+
181
+ <li>
182
+ variables: table: Table of key value pairs that can be used to set additional CMake variables for source dists.
183
+ </li>
184
+
185
+ </ul>
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <h3>Return value:</h3>
193
+ ok, log: Returns true on success. nil on error and log message.
194
+
195
+
196
+
197
+ </dd>
198
+
199
+
200
+
201
+
202
+ <dt><a name="filterManifest"></a><strong>filterManifest</strong>&nbsp;(list, constraints)</dt>
203
+ <dd>
204
+ Filter dist manifests using constraint functions. _filterManifest_ is used to remove dists from dist manifests that don't satisfy conditions. Conditions are specified using a table of functions. Functions are named after the attribute they check and return true if an argument satisfies its condition. When constraint are not defined a default set of constraints is used. These constraints filter out dists not suitable for the architecture LuaDist is running on. More specifically, only dists of arch "Universal" or of arch equal to cfg.arch and of type "all" or type equal to cfg.type are preserved. Additionally when source dists are enabled in configuration this will include dists of type equal to "source". In case no manifest is specified _filterManifest_ will automatically collect dist manifests from default repositories using _getManifest_.
205
+
206
+
207
+ <h3>Parameters</h3>
208
+ <ul>
209
+
210
+ <li>
211
+ list: table: Dist list or manifest to filter. By default all dists collected from cfg.repo will be filtered.
212
+ </li>
213
+
214
+ <li>
215
+ constraints: table: Table of constraint function. Key determines what dist attribute is checked while the value is the actual constraint test written as a function. By default dists are filtered for correct arch-type.
216
+ </li>
217
+
218
+ </ul>
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <h3>Return value:</h3>
226
+ manifest: Table containing collections of filtered dists.
227
+
228
+
229
+
230
+ </dd>
231
+
232
+
233
+
234
+
235
+ <dt><a name="findDists"></a><strong>findDists</strong>&nbsp;(names, manifest, name)</dt>
236
+ <dd>
237
+ Find dists in manifest by name. _findDists_ will find all dists in manifest that satisfy conditions in the name string. Name contains dist name to search for and a set of optional version constraints. For example searching for "lua-5.1.4" will find all dists of name "lua" and version "5.1.4". Searching for version ranges is done using sets of constraints eg. "luajit >= 2.0 < 3.0". For more information, limitations and use of the constraint system please see LuaDist documentation.
238
+
239
+
240
+ <h3>Parameters</h3>
241
+ <ul>
242
+
243
+ <li>
244
+ names:
245
+ </li>
246
+
247
+ <li>
248
+ manifest: string: Dist manifest to search through.
249
+ </li>
250
+
251
+ <li>
252
+ name: string: String specifying the dist to find, version constraints can be used. Case sensitive.
253
+ </li>
254
+
255
+ </ul>
256
+
257
+
258
+
259
+
260
+
261
+
262
+ <h3>Return value:</h3>
263
+ dist, log: List of matching dists. Returns nil on error and log message.
264
+
265
+
266
+
267
+ </dd>
268
+
269
+
270
+
271
+
272
+ <dt><a name="getDeployed"></a><strong>getDeployed</strong>&nbsp;(deployment)</dt>
273
+ <dd>
274
+ Get all deployed dists in the target dir, this will also list dists provided by other dists. _getDeployed_ will collect all deployed dists inside a deployment directory. This inludes entries that simulate provided dists which act as dependency satisfaction for dists during installation. Integration with host package managers can be achieved by providing a list of modules already installed directly to the host system. The list can be edited directly by the user in configuration.
275
+
276
+
277
+ <h3>Parameters</h3>
278
+ <ul>
279
+
280
+ <li>
281
+ deployment: string: Path to deployment directory. If not specified the deployment LuaDist is running in will be used.
282
+ </li>
283
+
284
+ </ul>
285
+
286
+
287
+
288
+
289
+
290
+
291
+ <h3>Return value:</h3>
292
+ manifest: Table containing collections of deployed dists.
293
+
294
+
295
+
296
+ </dd>
297
+
298
+
299
+
300
+
301
+ <dt><a name="getDeployment"></a><strong>getDeployment</strong>&nbsp;()</dt>
302
+ <dd>
303
+ Get deployment directory.
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+ <h3>Return value:</h3>
312
+ path: Full path to the LuaDist install directory
313
+
314
+
315
+
316
+ </dd>
317
+
318
+
319
+
320
+
321
+ <dt><a name="getDeps"></a><strong>getDeps</strong>&nbsp;(names, manifest)</dt>
322
+ <dd>
323
+ Collect dependencies. _getDeps_ is the magic function where dependency resolving happens. This function handles multiple names for which it computes the best possible set of dists that satisfy all the names. It consideres provided dists, conflicts and dependencies of each candidate dist and avoids dependency loops. It may not be very elegant or efficient, contributions welcome. The algorithm relies on sequential satisfaction of names. For each name it tries to determine best possible candidate and tries to install its dependencies and rest of the names list. If dependencies fail another candidate is checked untill all names check out or candidates run out. Provides are faked by injecting dists into manifest and replaced before return.
324
+
325
+
326
+ <h3>Parameters</h3>
327
+ <ul>
328
+
329
+ <li>
330
+ names: string or table: Names to compute dependencies for.
331
+ </li>
332
+
333
+ <li>
334
+ manifest: table: Manifest of dists to select dependencies from, needs to be sorted.
335
+ </li>
336
+
337
+ </ul>
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+ </dd>
347
+
348
+
349
+
350
+
351
+ <dt><a name="getInstalled"></a><strong>getInstalled</strong>&nbsp;(deployment)</dt>
352
+ <dd>
353
+ Get all installed dists from deployment directory. _getInstalled_ will collect all installed dists inside a deployment directory. These represent installed dists; provided dists are not included, see _getDeployed_ if you need a provided dists too.
354
+
355
+
356
+ <h3>Parameters</h3>
357
+ <ul>
358
+
359
+ <li>
360
+ deployment: string: Path to deployment directory. If not specified the deployment LuaDist is running in will be used.
361
+ </li>
362
+
363
+ </ul>
364
+
365
+
366
+
367
+
368
+
369
+
370
+ <h3>Return value:</h3>
371
+ manifest: Table containing collections of installed dists.
372
+
373
+
374
+
375
+ </dd>
376
+
377
+
378
+
379
+
380
+ <dt><a name="getManifest"></a><strong>getManifest</strong>&nbsp;(repositories)</dt>
381
+ <dd>
382
+ Get contents of repository or a list of repositories. _getManifest_ is used to fetch or generate collections of dist.info entries from URIs, system paths and on-line repositories. Returned dist manifests are not filtered and may not be appropriate for installation, see _filterManifest_ for this purpose. Dist information is gathered by collecting dist.info entries from dist.manifest file in case an URL to on-line repository is given. System paths are searched for dist.info files on demand and do extracted dists can be used for local repositories, this is handy for bootstrap and development of multiple interconnected dists. Zip archives and dists are peeked into on demand and in case it contains dist.info entry its added to the manifest. In case of multiple repositories, first repository always has priority. Dists are ordered by repository, name and version. Every item is checked, malformed entries are removed.
383
+
384
+
385
+ <h3>Parameters</h3>
386
+ <ul>
387
+
388
+ <li>
389
+ repositories: string or table: Path or URL of a repository or repositories. By default cfg.repo is used if argument is not defined.
390
+ </li>
391
+
392
+ </ul>
393
+
394
+
395
+
396
+
397
+
398
+
399
+ <h3>Return value:</h3>
400
+ manifest: Table containing collections of available dists.
401
+
402
+
403
+
404
+ </dd>
405
+
406
+
407
+
408
+
409
+ <dt><a name="install"></a><strong>install</strong>&nbsp;(names, deployment, manifest, variables, name)</dt>
410
+ <dd>
411
+ Install dist by name. _install_ is capable to install dists from various sources and of both source and binary type. Sources can be accumulated into install lists in which case LuaDist will install the sources in sequence. Sources supported by the command currently include: name, path and URL to .dist and .zip, path to unpacked dist and dist.info table.
412
+
413
+
414
+ <h3>Parameters</h3>
415
+ <ul>
416
+
417
+ <li>
418
+ names:
419
+ </li>
420
+
421
+ <li>
422
+ deployment: string: Deployment directory to install into. Leave undefined for current deployment directory.
423
+ </li>
424
+
425
+ <li>
426
+ manifest: table: Manifest of dists used to search for sources and resolve dependencies. Leave undefined for default repositories.
427
+ </li>
428
+
429
+ <li>
430
+ variables: table: Table of key value pairs that can be used to set additional CMake variables for source dists.
431
+ </li>
432
+
433
+ <li>
434
+ name: string: Package to install identified by name which can include version constraints. Case sensitive.
435
+ </li>
436
+
437
+ </ul>
438
+
439
+
440
+
441
+
442
+
443
+
444
+ <h3>Return value:</h3>
445
+ ok, log: Returns true on success. nil on error and log message.
446
+
447
+
448
+
449
+ </dd>
450
+
451
+
452
+
453
+
454
+ <dt><a name="pack"></a><strong>pack</strong>&nbsp;(names, deployment, dest, dist)</dt>
455
+ <dd>
456
+ Pack a deployed dist. _pack_ will pack specified dist from deployment deployment and generate .dist archives in dest. When no name is specified all dists will be packed.
457
+
458
+
459
+ <h3>Parameters</h3>
460
+ <ul>
461
+
462
+ <li>
463
+ names:
464
+ </li>
465
+
466
+ <li>
467
+ deployment: string: Deployment directory to uninstall from, nil for default LuaDist directory.
468
+ </li>
469
+
470
+ <li>
471
+ dest: string: Optional destination for the result
472
+ </li>
473
+
474
+ <li>
475
+ dist: string or table: Dist name or info to uninstall.
476
+ </li>
477
+
478
+ </ul>
479
+
480
+
481
+
482
+
483
+
484
+
485
+ <h3>Return value:</h3>
486
+ ok, log: Returns true on success. nil on error and log message.
487
+
488
+
489
+
490
+ </dd>
491
+
492
+
493
+
494
+
495
+ <dt><a name="remove"></a><strong>remove</strong>&nbsp;(names, deployment, dist)</dt>
496
+ <dd>
497
+ Remove a deployed dist. _remove_ will delete specified dist from deployment. When no name is specified, the whole deployment directory will be removed. WARNING: Calling "luadist remove" will instruct LuaDist to commit suicide.
498
+
499
+
500
+ <h3>Parameters</h3>
501
+ <ul>
502
+
503
+ <li>
504
+ names:
505
+ </li>
506
+
507
+ <li>
508
+ deployment: string: Deployment directory to uninstall from, nil for default LuaDist directory.
509
+ </li>
510
+
511
+ <li>
512
+ dist: string or table: Dist name or info to uninstall.
513
+ </li>
514
+
515
+ </ul>
516
+
517
+
518
+
519
+
520
+
521
+
522
+ <h3>Return value:</h3>
523
+ ok, log: Returns true on success. nil on error and log message.
524
+
525
+
526
+
527
+ </dd>
528
+
529
+
530
+ </dl>
531
+
532
+
533
+
534
+
535
+
536
+
537
+ </div> <!-- id="content" -->
538
+
539
+ </div> <!-- id="main" -->
540
+
541
+ <div id="about">
542
+ <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>
543
+ </div> <!-- id="about" -->
544
+
545
+ </div> <!-- id="container" -->
546
+ </body>
547
+ </html>