1 |
commit: 1b419a02a273495ee1480c2920103c58a7515bb6 |
2 |
Author: André Erdmann <dywi <AT> mailerd <DOT> de> |
3 |
AuthorDate: Tue Mar 5 11:21:03 2013 +0000 |
4 |
Commit: André Erdmann <dywi <AT> mailerd <DOT> de> |
5 |
CommitDate: Tue Mar 5 11:21:03 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=1b419a02 |
7 |
|
8 |
doc/rst: Package Rule Files, Configuration |
9 |
|
10 |
This commit adds a new chapter, Package Rules, which explains how to write |
11 |
rules that control overlay/ebuild creation. |
12 |
|
13 |
Additionally, the configuration reference has been updated to reflect the |
14 |
changes recently made, namely the DISTDIR config options. |
15 |
|
16 |
--- |
17 |
doc/rst/usage.rst | 553 +++++++++++++++++++++++++++++++++++++++++++++++------ |
18 |
1 files changed, 496 insertions(+), 57 deletions(-) |
19 |
|
20 |
diff --git a/doc/rst/usage.rst b/doc/rst/usage.rst |
21 |
index 45457f3..bd541f8 100644 |
22 |
--- a/doc/rst/usage.rst |
23 |
+++ b/doc/rst/usage.rst |
24 |
@@ -88,7 +88,7 @@ Expected prior knowlegde: |
25 |
|
26 |
* for Manifest creation: |
27 |
|
28 |
- * *ebuild* from portage |
29 |
+ * portage (*ebuild* and/or the *portage libs* directly) |
30 |
* *true* or *echo* from coreutils or busybox for preventing |
31 |
package downloads during Manifest creation (optional) |
32 |
|
33 |
@@ -98,7 +98,7 @@ Expected prior knowlegde: |
34 |
|
35 |
disk |
36 |
* 50-55GB disk space for the R packages |
37 |
- * a filesystem that supports symbolic links |
38 |
+ * a filesystem that supports symbolic or hard links |
39 |
* there will be many small-sized files (ebuilds), |
40 |
so a filesystem with lots of inodes and a small block size |
41 |
may be advantageous |
42 |
@@ -109,7 +109,9 @@ Expected prior knowlegde: |
43 |
using a slower one. |
44 |
|
45 |
time |
46 |
- Expect 3-6h execution time, depending on computing and I/O speed. |
47 |
+ Expect 3-6h execution time for the first run, depending on computing |
48 |
+ and I/O speed. *roverlay* is able to work in incremental mode, |
49 |
+ thus making subsequent runs need a lot less time. |
50 |
|
51 |
--------------------- |
52 |
via emerge (Gentoo) |
53 |
@@ -180,7 +182,7 @@ as the *R Overlay src directory* from now on. |
54 |
#!/bin/sh |
55 |
# /usr/local/bin/roverlay.sh |
56 |
# example wrapper script for roverlay |
57 |
- cd ${ROVERLAY_SRC:-~/roverlay/src} && ./roverlay.py $* |
58 |
+ cd ${ROVERLAY_SRC:-~/roverlay/src} && ./roverlay.py "$@" |
59 |
|
60 |
|
61 |
================== |
62 |
@@ -222,13 +224,14 @@ The following options should be set before running *roverlay*: |
63 |
This option is **required** and can be overridden on the command line |
64 |
via ``--distroot <directory>``. |
65 |
|
66 |
- .. Note:: |
67 |
+ Example: DISTFILES = ~/roverlay/distfiles |
68 |
|
69 |
- This directory will also contain a directory *__tmp__* |
70 |
- with symlinks to all packages which can be used as package mirror, |
71 |
- see `Providing a package mirror`_. |
72 |
+ DISTDIR |
73 |
+ This sets the directory that contains symbolic or hard links to |
74 |
+ all package files for which an ebuild could be created. It is used |
75 |
+ for Manifest file creation and can serve as package mirror directory. |
76 |
|
77 |
- Example: DISTFILES = ~/roverlay/distfiles |
78 |
+ Example: DISTDIR = ~/roverlay/distdir |
79 |
|
80 |
LOG_FILE |
81 |
This sets the log file. An empty value disables file logging. |
82 |
@@ -246,7 +249,7 @@ The following options should be set before running *roverlay*: |
83 |
|
84 |
Be careful with low log levels, especially *DEBUG*. |
85 |
They produce a lot of messages that help to track ebuild creation of |
86 |
- the R packages, but increase the size of log files dramatically. |
87 |
+ the R packages, but increase the log file size dramatically. |
88 |
|
89 |
LOG_LEVEL_CONSOLE |
90 |
This sets the console log level. |
91 |
@@ -272,10 +275,17 @@ have reasonable defaults if *roverlay* has been installed using *emerge*: |
92 |
REPO_CONFIG |
93 |
A list with one or more files that list repositories. |
94 |
This option is **required** and can be overridden on the command line |
95 |
- via one or more ``repo-config <file>`` statements. |
96 |
+ via one or more ``--repo-config <file>`` statements. |
97 |
|
98 |
Example: REPO_CONFIG = ~/roverlay/config/repo.list |
99 |
|
100 |
+ PACKAGE_RULES: |
101 |
+ A list of files and/or directories with package rules. |
102 |
+ Package rules can be used to control overlay/ebuild creation. |
103 |
+ This option is not required. |
104 |
+ |
105 |
+ Example: PACKAGE_RULES = ~/roverlay/config/packagerules.d |
106 |
+ |
107 |
FIELD_DEFINITION |
108 |
The value of this option should point to a field definition file which |
109 |
controls how an R package's DESCRIPTION file is read. |
110 |
@@ -294,6 +304,28 @@ have reasonable defaults if *roverlay* has been installed using *emerge*: |
111 |
|
112 |
Example: OVERLAY_ECLASS = ~/roverlay/eclass/R-packages.eclass |
113 |
|
114 |
+ DISTDIR_STRATEGY |
115 |
+ A list of methods that define how to create the DISTDIR. The methods |
116 |
+ will be tried in the specified order, until the first one succeeds. |
117 |
+ The available methods are *symlink*, *hardlink*, *copy* and *tmpdir*. |
118 |
+ This option is **required**. |
119 |
+ |
120 |
+ Example: DISTDIR_STRATEGY = "hardlink symlink" |
121 |
+ |
122 |
+ Try hard links first, then fall back to symbolic ones. This is the |
123 |
+ default value for this option. |
124 |
+ |
125 |
+ DISTDIR_FLAT |
126 |
+ This option controls whether DISTDIR will contain per-package |
127 |
+ subdirectories with links to the package files ("not flat") or all |
128 |
+ links/files in a single directory ("flat"). This option is ignored |
129 |
+ if DISTDIR_STRATEGY is *tmpdir*. |
130 |
+ Leaving this option as-is (*enabled*) is recommended if you want to use |
131 |
+ DISTDIR as package mirror. |
132 |
+ |
133 |
+ Example: DISTDIR_FLAT = yes |
134 |
+ |
135 |
+ |
136 |
There is another option that is useful for creating new dependency rules, |
137 |
LOG_FILE_UNRESOLVABLE_, which will write all unresolvable dependencies |
138 |
to the specified file (one dependency string per line). |
139 |
@@ -314,6 +346,9 @@ Dependency Rules |
140 |
See `Dependency Rules`_, which explains the dependency rule syntax amd how |
141 |
they work. |
142 |
|
143 |
+Package Rules |
144 |
+ See `Package Rules`_, which explains how to control *ebuild creation*. |
145 |
+ |
146 |
Main Config |
147 |
See `Configuration Reference`_ for all main config options like log file |
148 |
rotation and assistance for writing new *dependency rules*. |
149 |
@@ -402,10 +437,13 @@ For **testing** *roverlay*, these **options** may be convenient: |
150 |
Repo config file to use. Can be specified more than once. |
151 |
This disables all repo files configured in the main config file. |
152 |
|
153 |
---distdir directory, --from directory |
154 |
+--local-distdir directory, --from directory |
155 |
Create an overlay using the packages found in *directory*. This disables |
156 |
all other repositories. The *SRC_URI* ebuild variable will be invalid! |
157 |
|
158 |
+--print-package-rules, --ppr |
159 |
+ Print package rules to stdout after parsing them and exit. |
160 |
+ |
161 |
--overlay directory, -O directory |
162 |
Create the overlay at the given position. |
163 |
|
164 |
@@ -433,11 +471,16 @@ depres_console, depres |
165 |
Providing a package mirror |
166 |
---------------------------- |
167 |
|
168 |
-No recommendations available at this time. |
169 |
-The current ManifestCreation implementation creates a directory |
170 |
-*<distfiles root>/__tmp__* with symlinks to all packages, which could be used |
171 |
-for providing packages, but this may change in near future since external |
172 |
-Manifest creation is too slow (takes >60% of overlay creation time). |
173 |
+DISTDIR_ with a non-temporary strategy can be used to create a directory |
174 |
+containing all package files (as symbolic/hard links or as files). |
175 |
+You have to set up a *data service*, e.g. an http server, that makes this |
176 |
+directory accessible. |
177 |
+ |
178 |
+The default configuration will create hard links to all package files for |
179 |
+which an ebuild could be created in a single directory. It will fall back |
180 |
+to symbolic links if hard links are not supported. This should be fine in |
181 |
+most cases, but fine-tuning can be done via OVERLAY_DISTDIR_STRATEGY_ and |
182 |
+OVERLAY_DISTDIR_FLAT_. |
183 |
|
184 |
=============================== |
185 |
Basic Implementation Overview |
186 |
@@ -454,7 +497,7 @@ These are the steps that *roverlay* performs: |
187 |
|
188 |
2. scan the R Overlay directory (if it exists) for valid ebuilds |
189 |
|
190 |
-3. queue all R packages for ebuild creation |
191 |
+3. **add** - queue all R packages for ebuild creation |
192 |
|
193 |
* all repositories are asked to list their packages which are then added |
194 |
to a queue |
195 |
@@ -462,6 +505,10 @@ These are the steps that *roverlay* performs: |
196 |
* packages may be declined by the overlay creator if they already have |
197 |
an ebuild |
198 |
|
199 |
+ * packages may be declined or manipulated by package rules |
200 |
+ |
201 |
+ See also: `Package Rules`_ |
202 |
+ |
203 |
4. **create** - process each package *p* from the package queue |
204 |
(thread-able on a per package basis) |
205 |
|
206 |
@@ -488,15 +535,16 @@ These are the steps that *roverlay* performs: |
207 |
5. write the overlay |
208 |
|
209 |
* write all ebuilds |
210 |
- (thread-able on a per package basis) |
211 |
+ (supports threads on a per package basis) |
212 |
|
213 |
* write the *metadata.xml* files |
214 |
- (thread-able on a per package basis) |
215 |
+ (supports threads on a per package basis) |
216 |
|
217 |
* this uses the latest created ebuild available for a package |
218 |
|
219 |
* write the *Manifest* files |
220 |
- (not thread-able) |
221 |
+ (does not support threads by default / supports threads on a per package |
222 |
+ basis when using *portage* directly) |
223 |
|
224 |
* this uses all ebuilds availabe for a package |
225 |
|
226 |
@@ -1166,6 +1214,341 @@ Rule Stubs |
227 |
|
228 |
[<keychar>]<short dependency> |
229 |
|
230 |
+=============== |
231 |
+ Package Rules |
232 |
+=============== |
233 |
+ |
234 |
+Package Rules can be used to control both overlay and ebuild creation. |
235 |
+Each package rule consists of conditions, e.g. *package name contains amd64*, |
236 |
+and actions, e.g. *set KEYWORDS="-x86 amd64"*. |
237 |
+The actions of a rule will only be applied if a package meets all conditions, |
238 |
+otherwise the rule does nothing. |
239 |
+Moreover, rules can contain further rules which will only take effect if all |
240 |
+enclosing rules match a given package. |
241 |
+ |
242 |
+-------------------------- |
243 |
+ Package Rule File Syntax |
244 |
+-------------------------- |
245 |
+ |
246 |
+As stated above, each rule has two parts, a *match block* that lists the |
247 |
+rule's conditions and an *action block* that defines which actions and |
248 |
+nested rules are applied to a package if the rule matches it, i.e. if all |
249 |
+conditions are met. |
250 |
+ |
251 |
+A rule file contains zero or more package rules. |
252 |
+Each rule has to declare one *match* and one *action statement* at least. |
253 |
+The basic syntax for a rule with 1..m *match* and 1..n *action statements* is |
254 |
+ |
255 |
+.. code:: |
256 |
+ |
257 |
+ MATCH: |
258 |
+ <match statement 1> |
259 |
+ <match statement 2> |
260 |
+ ... |
261 |
+ <match statement m> |
262 |
+ ACTION: |
263 |
+ <action statement 1> |
264 |
+ <action statement 2> |
265 |
+ ... |
266 |
+ <action statement n> |
267 |
+ END; |
268 |
+ |
269 |
+ |
270 |
+A rule is introduced by the ``MATCH:`` keyword, which starts the |
271 |
+*match block* and is followed by one or more *match statements*, one per line. |
272 |
+The *match block* ends with the ``ACTION:`` keyword, which also starts the |
273 |
+*action block* and is followed by one or more *action statements* |
274 |
+(again, one per line). Finally, the rule is terminated by the ``END;`` keyword. |
275 |
+ |
276 |
+Indention is purely optional, leading and ending whitespace will be discarded. |
277 |
+Lines starting with ``#`` or ``;`` are considered to be comments and will be |
278 |
+ignored. |
279 |
+ |
280 |
+++++++++++++++ |
281 |
+ Match Blocks |
282 |
+++++++++++++++ |
283 |
+ |
284 |
+The *match block* lists one or more conditions, which all must evaluate to |
285 |
+*true* for a certain package, otherwise no actions will be applied. |
286 |
+There are two types of conditions, *trivial* conditions, |
287 |
+e.g. *always true/false* or *random - flip a coin*, and *non-trivial* ones |
288 |
+that depend on the information a package has, e.g. its repository or name. |
289 |
+ |
290 |
+Only *non-trivial* conditions can be defined in *match statements*. |
291 |
+The consist of a **match keyword** that defines *what* should be matched, an |
292 |
+**accepted value** to compare against and an **operator** that defines the |
293 |
+relation *accepted value - package's information*, i.e. *how* to compare. |
294 |
+The operator can be omitted, in which case it is determined by the |
295 |
+*match keyword*. |
296 |
+ |
297 |
+The *match statement* syntax is |
298 |
+ |
299 |
+.. code:: |
300 |
+ |
301 |
+ <match keyword> [<operator>] <accepted value> |
302 |
+ |
303 |
+ |
304 |
+These *match keywords* are recognized: |
305 |
+ |
306 |
+.. table:: match statement keywords |
307 |
+ |
308 |
+ +---------------+------------------+--------------------------------------+ |
309 |
+ | match keyword | default operator | matches | |
310 |
+ +===============+==================+======================================+ |
311 |
+ | repo | nocase-string | *alias to repo_name* | |
312 |
+ +---------------+------------------+--------------------------------------+ |
313 |
+ | repo_name | nocase-string | name of the repo, e.g. *CRAN* | |
314 |
+ +---------------+------------------+--------------------------------------+ |
315 |
+ | package | *implicit* | package file name with version | |
316 |
+ | | | but without the file extension, e.g. | |
317 |
+ | | | *rpart.plot_1.3-0* | |
318 |
+ +---------------+------------------+--------------------------------------+ |
319 |
+ | package_name | *implicit* | package file name without version | |
320 |
+ | | | and file extension, e.g. *seewave* | |
321 |
+ +---------------+------------------+--------------------------------------+ |
322 |
+ | name | *implicit* | *alias to package_name* | |
323 |
+ +---------------+------------------+--------------------------------------+ |
324 |
+ |
325 |
+Note the **implicit operator**. It will be used whenever no explicit operator |
326 |
+has been specified in the match statement and the match keyword does not |
327 |
+define a default one. Four explicit operators are available: |
328 |
+ |
329 |
+.. table:: match statement operators |
330 |
+ |
331 |
+ +---------------+-------------+--------------------------------------------+ |
332 |
+ | operator name | operator(s) | description | |
333 |
+ +===============+=============+============================================+ |
334 |
+ | exact-string | \=\= \= | exact string match | |
335 |
+ +---------------+-------------+--------------------------------------------+ |
336 |
+ | nocase-string | ,= =, | case-insensitive string match | |
337 |
+ +---------------+-------------+--------------------------------------------+ |
338 |
+ | exact-regex | ~= =~ | exact regex match *^<expression>$* | |
339 |
+ +---------------+-------------+--------------------------------------------+ |
340 |
+ | regex | ~~ ~ | partial regex match | |
341 |
+ +---------------+-------------+--------------------------------------------+ |
342 |
+ | *implicit* | *none* | *exact-regex* operator if *accepted value* | |
343 |
+ | | | has any wildcard characters (?, \*), else | |
344 |
+ | | | *exact-string*. Wildcard chars will | |
345 |
+ | | | be replaced with their regex equivalents. | |
346 |
+ +---------------+-------------+--------------------------------------------+ |
347 |
+ |
348 |
+The *accepted value* is a simple string or a regular expression, |
349 |
+which depends on the operator. |
350 |
+ |
351 |
+ |
352 |
+Extended Match Block Syntax |
353 |
+--------------------------- |
354 |
+ |
355 |
+Sometimes, a rule should apply its actions to a package if it matches *any* |
356 |
+condition, e.g. *package from CRAN or BIOC*, or if it does not match a certain |
357 |
+condition, e.g. *package not from BIOC/experiment*. |
358 |
+ |
359 |
+This is supported by special *match keywords* that represent |
360 |
+*boolean functions*. Such a *match statement* is introduced by the keyword, |
361 |
+followed by one or more *match statements* that are indented by one asterisk |
362 |
+``*`` or dash ``-`` character for each *boolean function* that is currently |
363 |
+active. These characters are important and indicate the *match depth*. |
364 |
+A depth of 0 means that no function is active. |
365 |
+ |
366 |
+Syntax Example: |
367 |
+ |
368 |
+.. code:: |
369 |
+ |
370 |
+ MATCH: |
371 |
+ <match statement 1, match depth 0> |
372 |
+ ... |
373 |
+ <boolean function> |
374 |
+ * <match statement 1, match depth 1> |
375 |
+ * <match statement 2, match depth 1> |
376 |
+ * ... |
377 |
+ * <match statement m, match depth 1> |
378 |
+ ... |
379 |
+ <match statement n, match depth 0> |
380 |
+ ACTION: |
381 |
+ ... |
382 |
+ END; |
383 |
+ |
384 |
+ |
385 |
+For reference, the following table lists the *boolean functions* available, |
386 |
+their *match keywords* and their meaning: |
387 |
+ |
388 |
+.. table:: boolean functions |
389 |
+ |
390 |
+ +------------------+-------------+----------------------------------------+ |
391 |
+ | boolean function | match | description | |
392 |
+ | | keyword(s) | | |
393 |
+ +==================+=============+========================================+ |
394 |
+ | AND | and all && | all listed conditions must match | |
395 |
+ +------------------+-------------+----------------------------------------+ |
396 |
+ | OR | or \|\| | any | |
397 |
+ | | | of the listed conditions must match | |
398 |
+ +------------------+-------------+----------------------------------------+ |
399 |
+ | XOR1 | xor1 xor ^^ | exactly one | |
400 |
+ | | | of the listed conditions must match | |
401 |
+ +------------------+-------------+----------------------------------------+ |
402 |
+ | NOR | nor none | none | |
403 |
+ | | | of the listed conditions must match | |
404 |
+ +------------------+-------------+----------------------------------------+ |
405 |
+ |
406 |
+ |
407 |
+In other words, a (boolean) match keyword starts a *nested match block* |
408 |
+at any position in the current one and increases the *match depth* by one. |
409 |
+The nested block is terminated by indenting out, i.e. decreasing the |
410 |
+*match depth* by one. The (extended) match statement syntax then becomes: |
411 |
+ |
412 |
+.. code:: |
413 |
+ |
414 |
+ <'*'^<match_depth>> <(basic) match statement> |
415 |
+ |
416 |
+ |
417 |
+.. Note:: |
418 |
+ |
419 |
+ The extended match statement syntax does not support boolean functions |
420 |
+ with a fixed number of conditions, e.g. 1. This is why there is no |
421 |
+ *NOT* function. The definition for more than one condition would be |
422 |
+ ambiguous, either *NOR* or *NAND*. |
423 |
+ |
424 |
+ Correspondingly, the logic for the top-level match block is *AND* by |
425 |
+ convention. |
426 |
+ |
427 |
+ |
428 |
+Using this syntax, match blocks can be nested indefinitely (minus technical |
429 |
+limitations): |
430 |
+ |
431 |
+.. code:: |
432 |
+ |
433 |
+ MATCH: |
434 |
+ <match statement 1, depth 0> |
435 |
+ <boolean function 2, depth 0> |
436 |
+ * <match statement 1, depth 1> |
437 |
+ * <match statement 2, depth 1> |
438 |
+ * ... |
439 |
+ * <match statement k-1, depth 1> |
440 |
+ * <boolean function k, depth 1> |
441 |
+ ** <match statement 1, depth 2> |
442 |
+ ** ... |
443 |
+ ** <match statement o, depth 2> |
444 |
+ * <match statement k+1, depth 1> |
445 |
+ * ... |
446 |
+ * <match statement m, depth 1> |
447 |
+ ... |
448 |
+ <match statement n, depth 0> |
449 |
+ ACTION: |
450 |
+ ... |
451 |
+ END; |
452 |
+ |
453 |
+ |
454 |
++++++++++++++++ |
455 |
+ Action Blocks |
456 |
++++++++++++++++ |
457 |
+ |
458 |
+The action block syntax is quite simple. Each *action statement* starts |
459 |
+with an *action keyword*, optionally followed by one or more *values*. |
460 |
+ |
461 |
+Action statement syntax: |
462 |
+ |
463 |
+.. code:: |
464 |
+ |
465 |
+ <action keyword> [<value>]* |
466 |
+ |
467 |
+ |
468 |
+The value(s) can be enclosed by quotation characters (``"``, ``'``). |
469 |
+ |
470 |
+The following table lists all *action keywords*, their impact (*what* they |
471 |
+control *where*) and the number of values they accept: |
472 |
+ |
473 |
+.. table:: action keywords |
474 |
+ |
475 |
+ +----------------+------------------+-------------+------------------------+ |
476 |
+ | action keyword | affects | # of values | description | |
477 |
+ +================+==================+=============+========================+ |
478 |
+ | ignore | | | ignore package, | |
479 |
+ +----------------+ overlay creation | none | do not try to create | |
480 |
+ | do-not-process | | | an ebuild for it | |
481 |
+ +----------------+------------------+-------------+------------------------+ |
482 |
+ | keywords | ebuild variables | >= 1 | set per-package | |
483 |
+ | | | | ``KEYWORDS`` | |
484 |
+ +----------------+------------------+-------------+------------------------+ |
485 |
+ |
486 |
+ |
487 |
+Extended Action Block Syntax |
488 |
+---------------------------- |
489 |
+ |
490 |
+A mentioned before, action blocks can contain *nested rules*. The syntax |
491 |
+is exactly the same as for the normal package rules: |
492 |
+ |
493 |
+.. code:: |
494 |
+ |
495 |
+ MATCH: |
496 |
+ # top-level rule, match block |
497 |
+ ... |
498 |
+ ACTION: |
499 |
+ # top-level rule, action block |
500 |
+ ... |
501 |
+ MATCH: |
502 |
+ # nested rule, match block |
503 |
+ ... |
504 |
+ ACTION: |
505 |
+ # nested rule, action block |
506 |
+ ... |
507 |
+ END; |
508 |
+ # top-level rule, action block continues |
509 |
+ ... |
510 |
+ END; |
511 |
+ |
512 |
+Rules can be nested indefinitely, whitespace indention is optional. |
513 |
+A *nested rule* only becomes active, i.e. tries to match a package, if its |
514 |
+enclosing rule already matched it. This can be used to reduce the number of |
515 |
+checks necessary for a given package. |
516 |
+ |
517 |
++++++++++++++++++++++++ |
518 |
+ Package Rule Examples |
519 |
++++++++++++++++++++++++ |
520 |
+ |
521 |
+A rule that ignores the 'yaqcaffy' package from CRAN, which is also available |
522 |
+from BIOC: |
523 |
+ |
524 |
+.. code:: |
525 |
+ |
526 |
+ MATCH: |
527 |
+ repo == CRAN |
528 |
+ package_name == yaqcaffy |
529 |
+ ACTION: |
530 |
+ do-not-process |
531 |
+ END; |
532 |
+ |
533 |
+ |
534 |
+A more complex example that sets the ``KEYWORDS`` ebuild variable for |
535 |
+all packages whose name contains *amd64* or *x86_64* to ``-x86 ~amd64`` |
536 |
+if the package is from BIOC/experiment, and otherwise to ``-x86 amd64``: |
537 |
+ |
538 |
+.. code:: |
539 |
+ |
540 |
+ MATCH: |
541 |
+ or |
542 |
+ * package_name ~ x86_64 |
543 |
+ * package_name ~ amd64 |
544 |
+ ACTION: |
545 |
+ MATCH: |
546 |
+ NOR |
547 |
+ * repo == BIOC/experiment |
548 |
+ ACTION: |
549 |
+ keywords "-x86 amd64" |
550 |
+ END; |
551 |
+ MATCH: |
552 |
+ repo == BIOC/experiment |
553 |
+ ACTION: |
554 |
+ keywords "-x86 ~amd64" |
555 |
+ END; |
556 |
+ END; |
557 |
+ |
558 |
+ |
559 |
+.. Caution:: |
560 |
+ |
561 |
+ Applying the same action more than once per package is not supported. |
562 |
+ That is why the example above uses another nested rule with a *NOR*-match |
563 |
+ instead of simply specifying the desired action. |
564 |
+ This limitation will be removed soon. |
565 |
|
566 |
========================= |
567 |
Configuration Reference |
568 |
@@ -1262,6 +1645,21 @@ RSYNC_BWLIMIT |
569 |
overlay options |
570 |
----------------- |
571 |
|
572 |
+.. _DISTDIR: |
573 |
+ |
574 |
+DISTDIR |
575 |
+ Alias to OVERLAY_DISTDIR_ROOT_. |
576 |
+ |
577 |
+.. _DISTDIR_FLAT: |
578 |
+ |
579 |
+DISTDIR_FLAT |
580 |
+ Alias to OVERLAY_DISTDIR_FLAT_. |
581 |
+ |
582 |
+.. _DISTDIR_STRATEGY: |
583 |
+ |
584 |
+DISTDIR_STRATEGY |
585 |
+ Alias to OVERLAY_DISTDIR_STRATEGY_. |
586 |
+ |
587 |
.. _ECLASS: |
588 |
|
589 |
ECLASS |
590 |
@@ -1287,6 +1685,61 @@ OVERLAY_DIR |
591 |
|
592 |
This option is **required**. |
593 |
|
594 |
+.. _OVERLAY_DISTDIR_FLAT: |
595 |
+ |
596 |
+OVERLAY_DISTDIR_FLAT |
597 |
+ A *bool* that controls the overall layout of _OVERLAY_DISTDIR_ROOT. |
598 |
+ |
599 |
+ A flat distdir is a single directory with all package files or package |
600 |
+ file links in it. A nested distdir contains per-package directories. |
601 |
+ |
602 |
+ Defaults to *true*. |
603 |
+ This option has no effect if the distdir strategy is *tmpdir*. |
604 |
+ |
605 |
+.. _OVERLAY_DISTDIR_ROOT: |
606 |
+ |
607 |
+OVERLAY_DISTDIR_ROOT |
608 |
+ Sets the DISTDIR root directory. It is used for Manifest file |
609 |
+ creation, but can serve as package mirror directory as well. |
610 |
+ |
611 |
+ The actual appearance of this directory is up to the distdir strategy |
612 |
+ (OVERLAY_DISTDIR_STRATEGY_) and OVERLAY_DISTDIR_FLAT_. |
613 |
+ Basically, it contains all package files that have a valid ebuild. |
614 |
+ |
615 |
+ .. Note:: |
616 |
+ |
617 |
+ This directory will not be cleaned up, only broken symbolic links |
618 |
+ will be removed. On the one hand, it is absolutely guaranteed that |
619 |
+ package files will not disappear unless replaced by a new file with |
620 |
+ the same name, but on the other hand, the directory may get bloated |
621 |
+ over time. |
622 |
+ |
623 |
+.. _OVERLAY_DISTDIR_STRATEGY: |
624 |
+ |
625 |
+OVERLAY_DISTDIR_STRATEGY |
626 |
+ The distdir strategy defines *how* package files are created. |
627 |
+ It is a list of methods that will be tried in the specified order, until |
628 |
+ the first one succeeds. |
629 |
+ |
630 |
+ .. table:: distdir creation methods |
631 |
+ |
632 |
+ +----------+-----------------------------------------------------------+ |
633 |
+ | method | description | |
634 |
+ +==========+===========================================================+ |
635 |
+ | symlink | use symbolic links | |
636 |
+ +----------+-----------------------------------------------------------+ |
637 |
+ | hardlink | use hard links | |
638 |
+ +----------+-----------------------------------------------------------+ |
639 |
+ | copy | copy package files | |
640 |
+ | | Obviously, this will need much more disk space. | |
641 |
+ +----------+-----------------------------------------------------------+ |
642 |
+ | tmpdir | use a temporary DISTDIR that will be deleted at exit. | |
643 |
+ | | This method is not compatible with any of the above. | |
644 |
+ +----------+-----------------------------------------------------------+ |
645 |
+ |
646 |
+ This option is **required**, but has a reasonable value in the default |
647 |
+ config file, "hardlink symlink". |
648 |
+ |
649 |
.. _OVERLAY_ECLASS: |
650 |
|
651 |
OVERLAY_ECLASS |
652 |
@@ -1311,9 +1764,11 @@ OVERLAY_KEEP_NTH_LATEST |
653 |
.. _OVERLAY_MANIFEST_IMPLEMENTATION: |
654 |
|
655 |
OVERLAY_MANIFEST_IMPLEMENTATION |
656 |
- Sets the implementation to use for Manifest file writing. |
657 |
- Available choices are 'external:ebuild', 'default' and 'none'. |
658 |
- Defaults to 'default'. |
659 |
+ Sets the implementation that will be used for Manifest file writing. |
660 |
+ Available choices are *ebuild*, *portage*, *default* and *none*. |
661 |
+ Defaults to *default* (-> *ebuild*). |
662 |
+ *portage* is highly experimental and therefore not recommended |
663 |
+ for production usage. |
664 |
|
665 |
.. Note:: |
666 |
|
667 |
@@ -1332,37 +1787,6 @@ OVERLAY_NAME |
668 |
|
669 |
Defaults to *R_Overlay*. |
670 |
|
671 |
-.. _OVERLAY_SYMLINK_DISTROOT_ROOT: |
672 |
- |
673 |
-OVERLAY_SYMLINK_DISTROOT_ROOT |
674 |
- Root directory where per-package (name) symlink directories will be |
675 |
- created during Manifest file creation. |
676 |
- |
677 |
- Defaults to <not set>, which is only valid if OVERLAY_SYMLINK_DISTROOT_TMP_ |
678 |
- is set to true, in which case a directory in the user's $TMPDIR will be |
679 |
- used. |
680 |
- |
681 |
-.. _OVERLAY_SYMLINK_DISTROOT_TMP: |
682 |
- |
683 |
-OVERLAY_SYMLINK_DISTROOT_TMP |
684 |
- A *bool* that sets whether the symlink distroot is a temporary (true) |
685 |
- or persistent (false) directory. |
686 |
- |
687 |
- A temporary directory will be wiped at exit |
688 |
- whereas a persistent one will only be cleaned up |
689 |
- (remove broken symlinks, ...). |
690 |
- |
691 |
- |
692 |
-.. _SYMLINK_DISTROOT: |
693 |
- |
694 |
-SYMLINK_DISTROOT |
695 |
- Alias to OVERLAY_SYMLINK_DISTROOT_ROOT_. |
696 |
- |
697 |
-.. _SYMLINK_DISTROOT_TMP: |
698 |
- |
699 |
-SYMLINK_DISTROOT_TMP |
700 |
- Alias to OVERLAY_SYMLINK_DISTROOT_TMP_. |
701 |
- |
702 |
-------------------- |
703 |
other config files |
704 |
-------------------- |
705 |
@@ -1390,6 +1814,17 @@ FIELD_DEFINITION |
706 |
FIELD_DEFINITION_FILE |
707 |
Alias to FIELD_DEFINITION_. |
708 |
|
709 |
+.. _PACKAGE_RULES: |
710 |
+ |
711 |
+PACKAGE_RULES |
712 |
+ Alias to PACKAGE_RULE_FILES_. |
713 |
+ |
714 |
+.. _PACKAGE_RULE_FILES: |
715 |
+ |
716 |
+PACKAGE_RULE_FILES |
717 |
+ A list of files and directories with package rules. |
718 |
+ Directories will be recursively scanned for rule files. |
719 |
+ |
720 |
.. _REPO_CONFIG: |
721 |
|
722 |
REPO_CONFIG |
723 |
@@ -1990,6 +2425,7 @@ The other available repository types have an internal-only implementation: |
724 |
Repository types also need an entry in the repository config loader in order |
725 |
to be accessible. |
726 |
|
727 |
+ |
728 |
--------- |
729 |
Overlay |
730 |
--------- |
731 |
@@ -2063,6 +2499,8 @@ It does the following steps: |
732 |
|
733 |
#. The *DESCRIPTION* and *SRC_URI* variables are created |
734 |
|
735 |
+#. Add any ebuild variables created by package rules, e.g. *KEYWORDS* |
736 |
+ |
737 |
#. **done** - Generate the ebuild as text, add it to *p* and mark *p* |
738 |
as *ebuild successfully created* |
739 |
|
740 |
@@ -2083,7 +2521,8 @@ to an *Ebuilder* that automatically sorts them and creates the ebuild. |
741 |
Overlay creation is the process of creating an overlay for many R packages |
742 |
and *roverlay*'s main task. More specifically, *OverlayCreation* is an |
743 |
*R packages -> Overlay (-> overlay in filesystem)* interface. |
744 |
-It accepts *PackageInfo* objects as input, tries to reserve a slot in the |
745 |
+It accepts *PackageInfo* objects as input, applies package rules to them, |
746 |
+which possibly filters some packages out, tries to reserve a slot in the |
747 |
overlay for them, and, if successful, adds them to the work queue. |
748 |
|
749 |
The work queue is processed by *OverlayWorkers* that run ebuild creation |
750 |
@@ -2152,7 +2591,7 @@ Try other dependency types |
751 |
document, such property is indicated by *TRY_OTHER* and |
752 |
*<preferred dependency type> first*, e.g. *package first*. |
753 |
|
754 |
-*Mandatory* and *Option* are mutually exclusive. |
755 |
+*Mandatory* and *Optional* are mutually exclusive. |
756 |
|
757 |
The *dependency type* of a *dependency string* is determined by its origin, |
758 |
i.e. info field in the package's DESCRIPTION file. |