1opam admin-cache(1) Opam admin Manual opam admin-cache(1)
2
3
4
6 opam admin-cache - Fills a local cache of package archives
7
9 opam admin cache [OPTION]... [DIR]
10
12 Downloads the archives for all packages to fill a local cache, that can
13 be used when serving the repository.
14
16 DIR (absent=~/build/BUILD/opam-2.0.1/doc/cache)
17 Name of the cache directory to use.
18
20 -j JOBS, --jobs=JOBS (absent=8)
21 Number of parallel downloads
22
23 --link=DIR
24 Create reverse symbolic links to the archives within DIR, in the
25 form DIR/PKG.VERSION/FILENAME.
26
27 -n, --no-repo-update
28 Don't check, create or update the 'repo' file to point to the
29 generated cache ('archive-mirrors:' field).
30
32 These options are common to all commands.
33
34 --best-effort
35 Don't fail if all requested packages can't be installed: try to
36 install as many as possible. Note that not all external solvers may
37 support this option (recent versions of aspcud or mccs should).
38
39 --color=WHEN
40 Colorize the output. WHEN must be one of `always', `never' or
41 `auto'.
42
43 --criteria=CRITERIA
44 Specify user preferences for dependency solving for this run.
45 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
46 on the supported language, and the external solvers available, see
47 http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html. A
48 general guide to using solver preferences can be found at
49 http://www.dicosmo.org/Articles/usercriteria.pdf.
50
51 --cudf=FILENAME
52 Debug option: Save the CUDF requests sent to the solver to
53 FILENAME-<n>.cudf.
54
55 --debug
56 Print debug message to stderr. This is equivalent to setting
57 $OPAMDEBUG to "true".
58
59 --debug-level=LEVEL
60 Like --debug, but allows specifying the debug level (--debug sets
61 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
62
63 --git-version
64 Print the git version of opam, if set (i.e. you are using a
65 development version), and exit.
66
67 --help[=FMT] (default=auto)
68 Show this help in format FMT. The value FMT must be one of `auto',
69 `pager', `groff' or `plain'. With `auto', the format is `pager` or
70 `plain' whenever the TERM env var is `dumb' or undefined.
71
72 --ignore-pin-depends
73 Ignore extra pins required by packages that get pinned, either
74 manually through opam pin or through opam install DIR. This is
75 equivalent to setting IGNOREPINDEPENDS=true.
76
77 --json=FILENAME
78 Save the results of the opam run in a computer-readable file. If
79 the filename contains the character `%', it will be replaced by an
80 index that doesn't overwrite an existing file. Similar to setting
81 the $OPAMJSON variable.
82
83 --no-auto-upgrade
84 When configuring or updating a repository that is written for an
85 earlier opam version (1.2), opam internally converts it to the
86 current format. This disables this behaviour. Note that
87 repositories should define their format version in a 'repo' file at
88 their root, or they will be assumed to be in the older format. It
89 is, in any case, preferable to upgrade the repositories manually
90 using opam admin upgrade [--mirror URL] when possible.
91
92 -q, --quiet
93 Disables --verbose.
94
95 --root=ROOT
96 Use ROOT as the current root path. This is equivalent to setting
97 $OPAMROOT to ROOT.
98
99 --safe, --readonly
100 Make sure nothing will be automatically updated or rewritten.
101 Useful for calling from completion scripts, for example. Will fail
102 whenever such an operation is needed ; also avoids waiting for
103 locks, skips interactive questions and overrides the $OPAMDEBUG
104 variable.
105
106 --solver=CMD
107 Specify the CUDF solver to use for resolving package installation
108 problems. This is either a predefined solver (this version of opam
109 supports builtin-mccs+lp(), builtin-mccs+glpk, aspcud, mccs,
110 aspcud-old, packup), or a custom command that should contain the
111 variables %{input}%, %{output}%, %{criteria}%, and optionally
112 %{timeout}%.
113
114 --strict
115 Fail whenever an error is found in a package definition or a
116 configuration file. The default is to continue silently if
117 possible.
118
119 --switch=SWITCH
120 Use SWITCH as the current compiler switch. This is equivalent to
121 setting $OPAMSWITCH to SWITCH.
122
123 --use-internal-solver, --no-aspcud
124 Disable any external solver, and use the built-in one (this
125 requires that opam has been compiled with a built-in solver).
126
127 -v, --verbose
128 Be more verbose. One -v shows all package commands, repeat to also
129 display commands called internally (e.g. tar, curl, patch etc.)
130 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
131
132 --version
133 Show version information.
134
135 -w, --working-dir
136 Whenever updating packages that are bound to a local,
137 version-controlled directory, update to the current working state
138 of their source instead of the last committed state, or the ref
139 they are pointing to. This only affects packages explicitly listed
140 on the command-line.
141
142 -y, --yes
143 Answer yes to all yes/no questions without prompting. This is
144 equivalent to setting $OPAMYES to "true".
145
147 Opam makes use of the environment variables listed here. Boolean
148 variables should be set to "0", "no", "false" or the empty string to
149 disable, "1", "yes" or "true" to enable.
150
151 OPAMCOLOR, when set to always or never, sets a default value for the
152 --color option.
153
154 OPAMCRITERIA specifies user preferences for dependency solving. The
155 default value depends on the solver version, use `config report` to
156 know the current setting. See also option --criteria
157
158 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
159 for more options.
160
161 OPAMDEBUG see options `--debug' and `--debug-level'.
162
163 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
164
165 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
166 fails. 0 to print all.
167
168 OPAMEXTERNALSOLVER see option `--solver'.
169
170 OPAMFETCH specifies how to download files: either `wget', `curl' or a
171 custom command where variables %{url}%, %{out}%, %{retry}%,
172 %{compress}% and %{checksum}% will be replaced. Overrides the
173 'download-command' value from the main config file.
174
175 OPAMJOBS sets the maximum number of parallel workers to run.
176
177 OPAMJSON log json output to the given file (use character `%' to index
178 the files)
179
180 OPAMLOCK see option `--lock'.
181
182 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
183 in an earlier format to the current one, on 'update' or 'init'.
184
185 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
186 some backups. This skips some finalisers and may also help to get more
187 reliable backtraces
188
189 OPAMLOCKRETRIES sets the number of tries after which OPAM gives up
190 acquiring its lock and fails. <= 0 means infinite wait.
191
192 OPAMNO answer no to any question asked.
193
194 OPAMNOASPCUD see option `--no-aspcud'.
195
196 OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
197
198 OPAMPINKINDAUTO sets whether version control systems should be detected
199 when pinning to a local path. Enabled by default since 1.3.0.
200
201 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
202 available (e.g. for `opam install`).
203
204 OPAMRETRY sets the number of tries before failing downloads.
205
206 OPAMROOT see option `--root'. This is automatically set by `opam env
207 --root=DIR --set-root'.
208
209 OPAMROOTISOK don't complain when running as root.
210
211 OPAMSAFE see option `--safe'
212
213 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
214 compatibility testing only.
215
216 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
217 60.0, set to 0 for unlimited. Note that all solvers may not support
218 this option.
219
220 OPAMSTATUSLINE display a dynamic status line showing what's currently
221 going on on the terminal. (one of one of `always', `never' or `auto')
222
223 OPAMSWITCH see option `--switch'. Automatically set by `opam env
224 --switch=SWITCH --set-switch'.
225
226 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
227 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
228 are set. See also option --criteria
229
230 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
231
232 OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
233 or `auto'). By default `auto', which is determined from the locale).
234
235 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
236 Implies OPAMUTF8. This is set by default on OSX only.
237
238 OPAMVAR_var overrides the contents of the variable var when
239 substituting `%{var}%` strings in `opam` files.
240
241 OPAMVAR_package_var overrides the contents of the variable package:var
242 when substituting `%{package:var}%` strings in `opam` files.
243
244 OPAMVERBOSE see option `--verbose'.
245
246 OPAMYES see option `--yes'.
247
249 As an exception to the following, the `exec' command returns 127 if the
250 command was not found or couldn't be executed, and the command's exit
251 value otherwise.
252
253 0 Success, or true for boolean queries.
254
255 1 False. Returned when a boolean return value is expected, e.g. when
256 running with --check, or for queries like opam lint.
257
258 2 Bad command-line arguments, or command-line arguments pointing to
259 an invalid context (e.g. file not following the expected format).
260
261 5 Not found. You requested something (package, version, repository,
262 etc.) that couldn't be found.
263
264 10 Aborted. The operation required confirmation, which wasn't given.
265
266 15 Could not acquire the locks required for the operation.
267
268 20 There is no solution to the user request. This can be caused by
269 asking to install two incompatible packages, for example.
270
271 30 Error in package definition, or other metadata files. Using
272 --strict raises this error more often.
273
274 31 Package script error. Some package operations were unsuccessful.
275 This may be an error in the packages or an incompatibility with
276 your system. This can be a partial error.
277
278 40 Sync error. Could not fetch some remotes from the network. This can
279 be a partial error.
280
281 50 Configuration error. Opam or system configuration doesn't allow
282 operation, and needs fixing.
283
284 60 Solver failure. The solver failed to return a sound answer. It can
285 be due to a broken external solver, or an error in solver
286 configuration.
287
288 99 Internal error. Something went wrong, likely due to a bug in opam
289 itself.
290
291 130 User interrupt. SIGINT was received, generally due to the user
292 pressing Ctrl-C.
293
295 See https://opam.ocaml.org/doc.
296
298 Vincent Bernardoff <vb@luminar.eu.org>
299 Raja Boujbel <raja.boujbel@ocamlpro.com>
300 Roberto Di Cosmo <roberto@dicosmo.org>
301 Thomas Gazagnaire <thomas@gazagnaire.org>
302 Louis Gesbert <louis.gesbert@ocamlpro.com>
303 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
304 Anil Madhavapeddy <anil@recoil.org>
305 Guillem Rieu <guillem.rieu@ocamlpro.com>
306 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
307 Frederic Tuong <tuong@users.gforge.inria.fr>
308
310 Check bug reports at https://github.com/ocaml/opam/issues.
311
312
313
314Opam admin 2.0.1 opam admin-cache(1)