-
Notifications
You must be signed in to change notification settings - Fork 0
/
g-cpan.xml
252 lines (226 loc) · 8.48 KB
/
g-cpan.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/perl/g-cpan.xml,v 1.1 2006/07/21 16:34:25 mcummings Exp $ -->
<!-- Do Not Translate !! -->
<guide link="/proj/en/perl/g-cpan.xml">
<title>g-cpan Guide</title>
<author title="Author">
<mail link="[email protected]">Michael Cummings</mail>
</author>
<abstract>
This document describes the functions of g-cpan
</abstract>
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
<version>1.0</version>
<date>2006-07-21</date>
<chapter>
<title>Intro</title>
<section>
<body>
<p>
<c>g-cpan</c> is a tool that generates and installs perl modules and bundles
from CPAN "on-the-fly." It was originally proposed on the gentoo-user mailing
list and filed as bug <uri link="http://bugs.gentoo.org/3450">3450</uri>.
</p>
</body>
</section>
</chapter>
<chapter>
<title>Usage</title>
<section>
<body>
<p>
See the table below for possible options to pass to <c>g-cpan</c>.
</p>
<pre caption="g-cpan Arguments">
<comment>g-cpan needs at least one parameter from the list below. </comment>
# g-cpan <OPTIONS> (PORTAGE OPTIONS)
</pre>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<ti>-g,--generate</ti>
<ti>Generate ebuilds and drop them in the overlay, but never call portage.
Useful for generating a tree of ebuilds without having permissions to
portage. Write permission to the defined DISTFILES directory will
still be needed.</ti>
</tr>
<tr>
<ti>-i,--install</ti>
<ti>Install the (list of) modules provided</ti>
</tr>
<tr>
<ti>-l,--list</ti>
<ti>List ebuilds that have been generated by g-cpan and reside in your overlay.</ti>
</tr>
<tr>
<ti>-L,--log</ti>
<ti>Log all output to <path>/var/log/g-cpan/g-cpan.log</path> and
<path>g-cpan.err</path></ti>
</tr>
<tr>
<ti>-s,--search</ti>
<ti>Search CPAN for the provided module.</ti>
</tr>
<tr>
<ti>--cpan_reload</ti>
<ti>Reload CPAN's index online</ti>
</tr>
<tr>
<ti>-u,--upgrade</ti>
<ti>Attempt to upgrade any ebuilds generated by g-cpan to newer versions. This option will create new ebuilds for those that exist in your overlay already. If a module name is given, it will attempt to only upgrade the requested module. If no arguments are given, all modules in your g-cpan overlay will be checked.</ti>
</tr>
<tr>
<ti>-v,--verbose</ti>
<ti>Enable verbose mode for more feedback on the step by step processes that g-cpan is running</ti>
</tr>
</table>
<pre caption="g-cpan Portage Arguments">
<comment>The following portage arguments can be passed to g-cpan. Please read
the portage documentation for more information on how they work. The
arguments are optional only.</comment>
</pre>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<ti>-a,--ask</ti>
<ti>Pass the "ask" argument to portage. This will cause portage to prompt
you to confirm your installation prior to issuing an emerge.</ti>
</tr>
<tr>
<ti>-b,--buildpkg</ti>
<ti>Tells emerge to build binary packages for all ebuilds processed in
addition to actually merging the packages.</ti>
</tr>
<tr>
<ti>-B,--buildpkgonly</ti>
<ti>Creates binary packages for all ebuilds processed without actually
merging the packages.</ti>
</tr>
<tr>
<ti>-p,--pretend</ti>
<ti>Create ebuilds as needed for the (list of) modules provided, but
don't perform the actual emerge.</ti>
</tr>
</table>
</body>
</section>
</chapter>
<chapter>
<title>CPAN Configuration</title>
<section>
<body>
<p>When you run g-cpan, it will check for two configuration files.
If you are root, it will check for the presense of an already
configured CPAN under your perl install path. If CPAN is not
configured, or you are not root, g-cpan will create a generic
configuration for CPAN in <path>~/.cpan/CPAN/</path> called
<c>MyConfig.pm</c>.
You can modify this file as needed at any time.</p>
<note>If you are upgrading to g-cpan-0.14 (or greater) from a
previoous version, the MyConfig.pm that was generated in the
old g-cpan's contained some mistakes. You may wish to save a
backup of this file and let g-cpan regenerate it.</note>
<p>The CPAN configuration file is used for interacting with CPAN,
determining what modules are available, what modules are
needed, and performing all basic CPAN functions.</p>
<p>Versions of g-cpan prior to 0.14 performed all of the CPAN
related work in <path>~/.cpan</path>. As of 0.14, the
downloading and exploration of the CPAN module for dependency
information is stored in <path>/var/tmp/g-cpan</path>. This
directory can be directly modified in the appropriate
<c>MyConfig.pm</c></p>
</body>
</section>
</chapter>
<chapter>
<title>g-cpan and Overlays</title>
<section>
<body>
<p>g-cpan is overlay "friendly." g-cpan will scan both the
overlays provided in your make.conf as well as any you have
set via environment variables, to help determine its course of
action. If you have defined overlays, g-cpan will use the
first overlay in your list that the user running it can write
to. Any ebuilds generated by g-cpan will be stored in this
overlay for future use (such as upgrading).</p>
<p>If no overlays are defined, or the user operating g-cpan cannot
write to an overlay, then anything generated will be written
to a temporary space and wiped on exit. Without an overlay to
write to, certain functions will not be available, such as upgrading.
</p>
</body>
</section>
</chapter>
<chapter>
<title>Caveats</title>
<section>
<body>
<ul>
<li>
g-cpan relies on your <c>ACCEPT_KEYWORDS</c> to generate ebuilds that
your system will install. If you haven't set your
<c>ACCEPT_KEYWORDS</c> in <path>/etc/make.conf</path>, it will
default to the complete list of supported architectures when
generating an ebuild. At this time, however, g-cpan cannot
check the <c>KEYWORDS</c> for the ebuilds in portage that your
requested module must depend on. It is therefore possible to
generate ebuilds that you cannot emerge because the depending
modules are not keyworded or unmasked for your architecture.
</li>
<li>g-cpan has no way of handling truly interactive module
installs. In the regular portage tree, that is something
we work around with patches and sed statements. g-cpan
does not have this luxury and may hang on an interactive
module install.
</li>
<li>
g-cpan isn't going to know about any special environment
variables or library paths that may be necessary to
compile a particular module, for instance a module
depending on database library paths. The best advise for
this is to use the <c>--generate</c> option and modify the
resulting ebuild yourself.
</li>
</ul>
</body>
</section>
</chapter>
<chapter>
<title>Bugs</title>
<section>
<body>
<p>
Please post any bugs to <uri>http://bugs.gentoo.org</uri> or
<uri>https://bugs.gentoo.org</uri> assigned to
<mail>[email protected]</mail>.
</p>
</body>
</section>
</chapter>
<chapter>
<title>Resources</title>
<section>
<body>
<p>
See also:
</p>
<ul>
<li><uri link="http://www.gentoo.org/doc/en/handbook/hb-portage-diverttree.xml">Diverting
from the Official Tree</uri> for working with overlays.</li>
<li><uri
link="http://www.gentoo.org/proj/en/devrel/handbook/hb-guide-ebuild.xml">Ebuild
HOWTO</uri> for working with generated ebuilds.</li>
</ul>
</body>
</section>
</chapter>
</guide>