1 |
commit: c73dd7909d2969d35451bd0945be545ddf0a155b |
2 |
Author: André Erdmann <dywi <AT> mailerd <DOT> de> |
3 |
AuthorDate: Wed Jun 5 18:05:14 2013 +0000 |
4 |
Commit: André Erdmann <dywi <AT> mailerd <DOT> de> |
5 |
CommitDate: Wed Jun 5 18:05:14 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=c73dd790 |
7 |
|
8 |
doc/rst, package rules: set/rename actions |
9 |
|
10 |
--- |
11 |
doc/rst/usage.rst | 110 +++++++++++++++++++++++++++++++++++++++++++++++++----- |
12 |
1 file changed, 100 insertions(+), 10 deletions(-) |
13 |
|
14 |
diff --git a/doc/rst/usage.rst b/doc/rst/usage.rst |
15 |
index 34ce7ac..e74c091 100644 |
16 |
--- a/doc/rst/usage.rst |
17 |
+++ b/doc/rst/usage.rst |
18 |
@@ -405,6 +405,10 @@ to know in detail what *roverlay* does before running it. |
19 |
Summary: Expect 300 (slow) or 600MB (fast) memory consumption when using |
20 |
the default package repositories. |
21 |
|
22 |
+--fixup-category-move, --fixup-category-move-reverse |
23 |
+ Remove ebuilds that have been moved to a different category. |
24 |
+ See `Action Blocks`_ in `Package Rules`_ for details. |
25 |
+ |
26 |
--config file, -c file |
27 |
Path to the config file |
28 |
|
29 |
@@ -1223,6 +1227,7 @@ Rule Stubs |
30 |
|
31 |
[<keychar>]<short dependency> |
32 |
|
33 |
+ |
34 |
=============== |
35 |
Package Rules |
36 |
=============== |
37 |
@@ -1315,7 +1320,12 @@ These *match keywords* are recognized: |
38 |
| package_name | *implicit* | package file name without version | |
39 |
| | | and file extension, e.g. *seewave* | |
40 |
+---------------+------------------+--------------------------------------+ |
41 |
- | name | *implicit* | *alias to package_name* | |
42 |
+ | ebuild_name | *implicit* | ebuild name ``${PN}``, which is the | |
43 |
+ | | | package_name with special chars | |
44 |
+ | | | removed or replaced (e.g., | |
45 |
+ | | | *R.oo* (pkg) => *R_oo* (ebuild)) | |
46 |
+ +---------------+------------------+--------------------------------------+ |
47 |
+ | name | *implicit* | *alias to ebuild_name* | |
48 |
+---------------+------------------+--------------------------------------+ |
49 |
|
50 |
Note the **implicit operator**. It will be used whenever no explicit operator |
51 |
@@ -1478,21 +1488,60 @@ control *where*) and the number of values they accept: |
52 |
| keywords | ebuild variables | >= 1 | set per-package | |
53 |
| | | | ``KEYWORDS`` | |
54 |
+----------------+------------------+-------------+------------------------+ |
55 |
- | trace | package rules | none | marks a package as | |
56 |
+ | trace | package rules | none | mark a package as | |
57 |
| | | | modified | |
58 |
+ + +-------------+------------------------+ |
59 |
- | | | 1 | adds the stored string | |
60 |
+ | | | 1 | add the stored string | |
61 |
| | | | to a package's | |
62 |
| | | | *modified* variable | |
63 |
| | | | whenever this action | |
64 |
| | | | is applied | |
65 |
+----------------+------------------+-------------+------------------------+ |
66 |
+ | set | package | 2 | set package | |
67 |
+ +----------------+ metadata, +-------------+ information | |
68 |
+ | set_<key> | overlay creaton | 1 | | |
69 |
+ +----------------+------------------+-------------+------------------------+ |
70 |
+ | rename | package | 2 | modify package | |
71 |
+ +----------------+ metadata, +-------------+ information with | |
72 |
+ | rename_<key> | overlay creation | 1 | sed-like | |
73 |
+ | | | | *s/expr/repl/* | |
74 |
+ | | | | statements | |
75 |
+ +----------------+------------------+-------------+------------------------+ |
76 |
+ |
77 |
+The two-arg form of the set/rename keywords expect a <key> as first and |
78 |
+a value / sed expression as second arg. The one-arg form expects the latter |
79 |
+one only. The "/" delimitier in the sed expression can be any character. |
80 |
|
81 |
+The following *info keys* can be set and/or modified: |
82 |
+ |
83 |
+.. table:: info keys for set/rename |
84 |
+ |
85 |
+ +--------------+---------------------+-------------------------------------+ |
86 |
+ | info key | supports set/rename | description | |
87 |
+ +==============+=====================+=====================================+ |
88 |
+ | name | yes / yes | rename the ebuild | |
89 |
+ +--------------+---------------------+-------------------------------------+ |
90 |
+ | category | yes / **no** | set package category | |
91 |
+ +--------------+---------------------+-------------------------------------+ |
92 |
+ | destfile | yes / yes | rename ebuild destfile by using the | |
93 |
+ | | | '->' operator in ``${SRC_URI}`` | |
94 |
+ +--------------+---------------------+-------------------------------------+ |
95 |
+ |
96 |
+.. Caution:: |
97 |
+ |
98 |
+ Category moves are not handled automatically. In incremental mode, overlay |
99 |
+ creation has to be called with either ``--fixup-category-move`` or |
100 |
+ ``--fixup-category-move-reverse``, depending on whether the package(s) |
101 |
+ have been moved away from the default category or back to the default |
102 |
+ category ("reverse"). Configuring both category move types at once requires |
103 |
+ a full recreation of the overlay, that is ``rm -rf <overlay dir>`` |
104 |
+ followed by ``roverlay create``. |
105 |
|
106 |
.. Note:: |
107 |
|
108 |
- Applying the same (non-incremental) ebuild variable action more than once |
109 |
- is possible, but only the last one will have an effect on ebuild creation. |
110 |
+ Applying the same (non-incremental) ebuild variable, set or rename action |
111 |
+ more than once is possible, but only the last one will have an effect |
112 |
+ on ebuild creation. |
113 |
|
114 |
|
115 |
Extended Action Block Syntax |
116 |
@@ -1562,6 +1611,46 @@ if the package is from BIOC/experiment, and otherwise to ``-x86 amd64``: |
117 |
END; |
118 |
|
119 |
|
120 |
+A rule that assigns all packages from BIOC-2.10/bioc to sci-bioc: |
121 |
+ |
122 |
+.. code:: |
123 |
+ |
124 |
+ MATCH: |
125 |
+ repo == BIOC-2.10/bioc |
126 |
+ ACTION: |
127 |
+ set category sci-bioc |
128 |
+ END; |
129 |
+ |
130 |
+ # alternatively: |
131 |
+ MATCH: |
132 |
+ repo == BIOC-2.10/bioc |
133 |
+ ACTION: |
134 |
+ set_category sci-bioc |
135 |
+ END; |
136 |
+ |
137 |
+ |
138 |
+The following example prefixes all *yaml* packages with *Rpkg_*: |
139 |
+ |
140 |
+.. code:: |
141 |
+ |
142 |
+ MATCH: |
143 |
+ ebuild_name ,= yaml |
144 |
+ ACTION: |
145 |
+ rename destfile s/^/Rpkg_/ |
146 |
+ END; |
147 |
+ |
148 |
+ |
149 |
+Moving such packages to a "R-package" sub directory would be possible, too: |
150 |
+ |
151 |
+.. code:: |
152 |
+ |
153 |
+ MATCH: |
154 |
+ name ,= yaml |
155 |
+ ACTION: |
156 |
+ rename_destfile s=^=R-package= |
157 |
+ END; |
158 |
+ |
159 |
+ |
160 |
========================= |
161 |
Configuration Reference |
162 |
========================= |
163 |
@@ -1639,8 +1728,9 @@ DISTROOT |
164 |
|
165 |
EBUILD_PROG |
166 |
Name or path of the ebuild executables that is required for (external) |
167 |
- Manifest file creation. A wrong value will cause ebuild creation late, |
168 |
- which is a huge time loss, so make sure that this option is properly set. |
169 |
+ Manifest file creation. A wrong value will cause ebuild creation to fail |
170 |
+ late, which is a huge time loss, so make sure that this option is properly |
171 |
+ set. |
172 |
|
173 |
Defaults to *ebuild*, which should be fine in most cases. |
174 |
|
175 |
@@ -2340,9 +2430,9 @@ functionality: |
176 |
* *sync* all repos and *nosync* all repos (offline mode) |
177 |
* create *PackageInfo* instances for R packages from all repositories |
178 |
|
179 |
-++++++++++++++ |
180 |
- Repositories |
181 |
-++++++++++++++ |
182 |
+++++++++++++ |
183 |
+ Repository |
184 |
+++++++++++++ |
185 |
|
186 |
The functionality described above is an abstraction layer that calls the |
187 |
respective function for each repository and collects the result. |