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