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