1OPAM ADMIN-CHECK(1)            Opam admin Manual           OPAM ADMIN-CHECK(1)
2
3
4

NAME

6       opam admin-check - Runs some consistency checks on a repository
7

SYNOPSIS

9       opam admin check [OPTION]...
10

DESCRIPTION

12       This command runs consistency checks on a repository, and prints a
13       report to stdout. Checks include packages that are not installable (due
14       e.g. to a missing dependency) and dependency cycles. The 'available'
15       field is ignored for these checks, that is, all packages are supposed
16       to be available. By default, all checks are run.
17

OPTIONS

19       --cycles
20           Do the cycles check (and disable the others by default)
21
22       -i, --ignore-test-doc
23           By default, {with-test} and {with-doc} dependencies are included.
24           This ignores them, and makes the test more tolerant.
25
26       --installability
27           Do the installability check (and disable the others by default)
28
29       --no
30           Answer no to all opam yes/no questions without prompting. See also
31           --confirm-level. This is equivalent to setting $OPAMNO to "true".
32
33       --obsolete
34           Analyse for obsolete packages
35
36       -s, --short
37           Only output a list of uninstallable packages
38
39       -y, --yes
40           Answer yes to all opam yes/no questions without prompting. See also
41           --confirm-level. This is equivalent to setting $OPAMYES to "true".
42

COMMON OPTIONS

44       These options are common to all commands.
45
46       --best-effort
47           Don't fail if all requested packages can't be installed: try to
48           install as many as possible. Note that not all external solvers may
49           support this option (recent versions of aspcud or mccs should).
50           This is equivalent to setting $OPAMBESTEFFORT environment variable.
51
52       --cli=MAJOR.MINOR (absent=2.1)
53           Use the command-line interface syntax and semantics of MAJOR.MINOR.
54           Intended for any persistent use of opam (scripts, blog posts,
55           etc.), any version of opam in the same MAJOR series will behave as
56           for the specified MINOR release. The flag was not available in opam
57           2.0, so to select the 2.0 CLI, set the OPAMCLI environment variable
58           to 2.0 instead of using this parameter.
59
60       --color=WHEN
61           Colorize the output. WHEN must be one of `always', `never' or
62           `auto'.
63
64       --confirm-level=LEVEL
65           Confirmation level, LEVEL must be one of `ask', `no', `yes' or
66           `unsafe-yes'. Can be specified more than once. If --yes or --no are
67           also given, the value of the last --confirm-level is taken into
68           account. This is equivalent to setting  $OPAMCONFIRMLEVEL`.
69
70       --criteria=CRITERIA
71           Specify user preferences for dependency solving for this run.
72           Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
73           on the supported language, and the external solvers available, see
74           http://opam.ocaml.org/doc/External_solvers.html. A general guide to
75           using solver preferences can be found at
76           http://www.dicosmo.org/Articles/usercriteria.pdf.
77
78       --cudf=FILENAME
79           Debug option: Save the CUDF requests sent to the solver to
80           FILENAME-<n>.cudf.
81
82       --debug
83           Print debug message to stderr. This is equivalent to setting
84           $OPAMDEBUG to "true".
85
86       --debug-level=LEVEL
87           Like --debug, but allows specifying the debug level (--debug sets
88           it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
89
90       --git-version
91           Print the git version of opam, if set (i.e. you are using a
92           development version), and exit.
93
94       --help[=FMT] (default=auto)
95           Show this help in format FMT. The value FMT must be one of `auto',
96           `pager', `groff' or `plain'. With `auto', the format is `pager` or
97           `plain' whenever the TERM env var is `dumb' or undefined.
98
99       --ignore-pin-depends
100           Ignore extra pins required by packages that get pinned, either
101           manually through opam pin or through opam install DIR. This is
102           equivalent to setting IGNOREPINDEPENDS=true.
103
104       --json=FILENAME
105           Save the results of the opam run in a computer-readable file. If
106           the filename contains the character `%', it will be replaced by an
107           index that doesn't overwrite an existing file. Similar to setting
108           the $OPAMJSON variable.
109
110       --no-aspcud
111           Removed in 2.1.
112
113       --no-auto-upgrade
114           When configuring or updating a repository that is written for an
115           earlier opam version (1.2), opam internally converts it to the
116           current format. This disables this behaviour. Note that
117           repositories should define their format version in a 'repo' file at
118           their root, or they will be assumed to be in the older format. It
119           is, in any case, preferable to upgrade the repositories manually
120           using opam admin upgrade [--mirror URL] when possible.
121
122       -q, --quiet
123           Disables --verbose.
124
125       --root=ROOT
126           Use ROOT as the current root path. This is equivalent to setting
127           $OPAMROOT to ROOT.
128
129       --safe, --readonly
130           Make sure nothing will be automatically updated or rewritten.
131           Useful for calling from completion scripts, for example. Will fail
132           whenever such an operation is needed ; also avoids waiting for
133           locks, skips interactive questions and overrides the $OPAMDEBUG
134           variable. This is equivalent to set environment variable $OPAMSAFE.
135
136       --solver=CMD
137           Specify the CUDF solver to use for resolving package installation
138           problems. This is either a predefined solver (this version of opam
139           supports builtin-mccs+lp(), builtin-mccs+glpk,
140           builtin-dummy-z3-solver, builtin-dummy-0install-solver, aspcud,
141           mccs, aspcud-old, packup), or a custom command that should contain
142           the variables %{input}%, %{output}%, %{criteria}%, and optionally
143           %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
144
145       --strict
146           Fail whenever an error is found in a package definition or a
147           configuration file. The default is to continue silently if
148           possible.
149
150       --switch=SWITCH
151           Use SWITCH as the current compiler switch. This is equivalent to
152           setting $OPAMSWITCH to SWITCH.
153
154       --use-internal-solver
155           Disable any external solver, and use the built-in one (this
156           requires that opam has been compiled with a built-in solver). This
157           is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
158
159       -v, --verbose
160           Be more verbose. One -v shows all package commands, repeat to also
161           display commands called internally (e.g. tar, curl, patch etc.)
162           Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
163
164       --version
165           Show version information.
166
167       -w, --working-dir
168           Whenever updating packages that are bound to a local,
169           version-controlled directory, update to the current working state
170           of their source instead of the last committed state, or the ref
171           they are pointing to. As source directory is copied as it is, if it
172           isn't clean it may result on a opam build failure.This only affects
173           packages explicitly listed on the command-line.It can also be set
174           with $OPAMWORKINGDIR.
175

ENVIRONMENT

177       Opam makes use of the environment variables listed here. Boolean
178       variables should be set to "0", "no", "false" or the empty string to
179       disable, "1", "yes" or "true" to enable.
180
181       OPAMALLPARENS surround all filters with parenthesis.
182
183       OPAMASSUMEDEPEXTS see option `--assume-depexts'.
184
185       OPAMAUTOREMOVE see remove option `--auto-remove'.
186
187       OPAMBESTEFFORT see option `--best-effort'.
188
189       OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
190       the criteria when the `--best-effort' option is set, and is expected to
191       maximise the `opam-query' property in the solution.
192
193       OPAMBUILDDOC Removed in 2.1.
194
195       OPAMBUILDTEST Removed in 2.1.
196
197       OPAMCLI see option `--cli'.
198
199       OPAMCOLOR when set to always or never, sets a default value for the
200       `--color' option.
201
202       OPAMCONFIRMLEVEL see option `--confirm-level`. OPAMCONFIRMLEVEL has
203       priority over OPAMYES and OPAMNO.
204
205       OPAMCRITERIA specifies user preferences for dependency solving. The
206       default value depends on the solver version, use `config report' to
207       know the current setting. See also option --criteria.
208
209       OPAMCUDFFILE save the cudf graph to file-actions-explicit.dot.
210
211       OPAMCUDFTRIM controls the filtering of unrelated packages during CUDF
212       preprocessing.
213
214       OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
215       for more options.
216
217       OPAMDEBUG see options `--debug' and `--debug-level'.
218
219       OPAMDEBUGSECTIONS if set, limits debug messages to the space-separated
220       list of sections. Sections can optionally have a specific debug level
221       (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use
222       `--debug-level'.
223
224       OPAMDIGDEPTH defines how aggressive the lookup for conflicts during
225       CUDF preprocessing is.
226
227       OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
228
229       OPAMDROPWORKINGDIR overrides packages previously updated with
230       --working-dir on update. Without this variable set, opam would keep
231       them unchanged unless explicitly named on the command-line.
232
233       OPAMDRYRUN see option `--dry-run'.
234
235       OPAMEDITOR sets the editor to use for opam file editing, overrides
236       $EDITOR and $VISUAL.
237
238       OPAMERRLOGLEN sets the number of log lines printed when a sub-process
239       fails. 0 to print all.
240
241       OPAMEXTERNALSOLVER see option `--solver'.
242
243       OPAMFAKE see option `--fake'.
244
245       OPAMFETCH specifies how to download files: either `wget', `curl' or a
246       custom command where variables %{url}%, %{out}%, %{retry}%,
247       %{compress}% and %{checksum}% will be replaced. Overrides the
248       'download-command' value from the main config file.
249
250       OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup.
251
252       OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on'.
253
254       OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends'.
255
256       OPAMINPLACEBUILD see option `--inplace-build'.
257
258       OPAMJOBS sets the maximum number of parallel workers to run.
259
260       OPAMJSON log json output to the given file (use character `%' to index
261       the files).
262
263       OPAMKEEPBUILDDIR see install option `--keep-build-dir'.
264
265       OPAMKEEPLOGS tells opam to not remove some temporary command logs and
266       some backups. This skips some finalisers and may also help to get more
267       reliable backtraces.
268
269       OPAMLOCKED combination of `--locked' and `--lock-suffix' options.
270
271       OPAMLOGS logdir sets log directory, default is a temporary directory in
272       /tmp
273
274       OPAMMAKECMD set the system make command to use.
275
276       OPAMMERGEOUT merge process outputs, stderr on stdout.
277
278       OPAMNO answer no to any question asked, see options `--no` and
279       `--confirm-level`. OPAMNO is ignored if either OPAMCONFIRMLEVEL or
280       OPAMYES is set.
281
282       OPAMNOAGGREGATE with `opam admin check', don't aggregate packages.
283
284       OPAMNOASPCUD Deprecated.
285
286       OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
287       in an earlier format to the current one, on 'update' or 'init'.
288
289       OPAMNOCHECKSUMS enables option --no-checksums when available.
290
291       OPAMNODEPEXTS disables system dependencies handling, see option
292       `--no-depexts'.
293
294       OPAMNOENVNOTICE Internal.
295
296       OPAMNOSELFUPGRADE see option `--no-self-upgrade'
297
298       OPAMPINKINDAUTO sets whether version control systems should be detected
299       when pinning to a local path. Enabled by default since 1.3.0.
300
301       OPAMPRECISETRACKING fine grain tracking of directories.
302
303       OPAMPREPRO set this to false to disable CUDF preprocessing. Less
304       efficient, but might help debugging solver issue.
305
306       OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
307       available (e.g. for `opam install').
308
309       OPAMRETRIES sets the number of tries before failing downloads.
310
311       OPAMREUSEBUILDDIR see option `--reuse-build-dir'.
312
313       OPAMROOT see option `--root'. This is automatically set by `opam env
314       --root=DIR --set-root'.
315
316       OPAMROOTISOK don't complain when running as root.
317
318       OPAMSAFE see option `--safe'.
319
320       OPAMSHOW see option `--show'.
321
322       OPAMSKIPUPDATE see option `--skip-updates'.
323
324       OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
325       compatibility testing only.
326
327       OPAMSOLVERALLOWSUBOPTIMAL (default `true') allows some solvers to still
328       return a solution when they reach timeout; while the solution remains
329       assured to be consistent, there is no guarantee in this case that it
330       fits the expected optimisation criteria. If `true', opam willcontinue
331       with a warning, if `false' a timeout is an error. Currently only the
332       builtin-z3 backend handles this degraded case.
333
334       OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
335       60.0, set to 0 for unlimited. Note that all solvers may not support
336       this option.
337
338       OPAMSTATS display stats at the end of command.
339
340       OPAMSTATUSLINE display a dynamic status line showing what's currently
341       going on on the terminal. (one of one of `always', `never' or `auto')
342
343       OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.).
344
345       OPAMSWITCH see option `--switch'. Automatically set by `opam env
346       --switch=SWITCH --set-switch'.
347
348       OPAMUNLOCKBASE see install option `--unlock-base'.
349
350       OPAMUPGRADECRITERIA specifies user preferences for dependency solving
351       when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
352       are set. See also option --criteria.
353
354       OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
355
356       OPAMUSEOPENSSL force openssl use for hash computing.
357
358       OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
359       or `auto'). By default `auto', which is determined from the locale).
360
361       OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
362       Implies OPAMUTF8. This is set by default on OSX only.
363
364       OPAMVALIDATIONHOOK if set, uses the `%{hook%}' command to validate an
365       opam repository update.
366
367       OPAMVERBOSE see option `--verbose'.
368
369       OPAMVERSIONLAGPOWER do not use.
370
371       OPAMWITHDOC see install option `--with-doc'.
372
373       OPAMWITHTEST see install option `--with-test.
374
375       OPAMWORKINGDIR see option `--working-dir'.
376
377       OPAMYES see options `--yes' and `--confirm-level`. OPAMYES has has
378       priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set.
379
380       OPAMVAR_var overrides the contents of the variable var when
381       substituting `%{var}%` strings in `opam` files.
382
383       OPAMVAR_package_var overrides the contents of the variable package:var
384       when substituting `%{package:var}%` strings in `opam` files.
385

CLI VERSION

387       All scripts and programmatic invocations of opam should use `--cli' in
388       order to ensure that they work seamlessly with future versions of the
389       opam client. Additionally, blog posts or other documentation can
390       benefit, as it prevents information from becoming stale.
391
392       Although opam only supports roots (~/.opam/) for the current version,
393       it does provide backwards compatibility for its command-line interface.
394
395       Since CLI version support was only added in opam 2.1, use OPAMCLI to
396       select 2.0 support (as opam 2.0 will just ignore it), and `--cli=2.1'
397       for 2.1 (or later) versions, since an environment variable controlling
398       the parsing of syntax is brittle. To this end, opam displays a warning
399       if OPAMCLI specifies a valid version other than 2.0, and also if
400       `--cli=2.0' is specified.
401
402       The command-line version is selected by using the `--cli' option or the
403       OPAMCLI environment variable. `--cli' may be specified morethan once,
404       where the last instance takes precedence. OPAMCLI is only inspected if
405       `--cli' is not given.
406

EXIT STATUS

408       As an exception to the following, the `exec' command returns 127 if the
409       command was not found or couldn't be executed, and the command's exit
410       value otherwise.
411
412       0   Success, or true for boolean queries.
413
414       1   False. Returned when a boolean return value is expected, e.g. when
415           running with --check, or for queries like opam lint.
416
417       2   Bad command-line arguments, or command-line arguments pointing to
418           an invalid context (e.g. file not following the expected format).
419
420       5   Not found. You requested something (package, version, repository,
421           etc.) that couldn't be found.
422
423       10  Aborted. The operation required confirmation, which wasn't given.
424
425       15  Could not acquire the locks required for the operation.
426
427       20  There is no solution to the user request. This can be caused by
428           asking to install two incompatible packages, for example.
429
430       30  Error in package definition, or other metadata files. Using
431           --strict raises this error more often.
432
433       31  Package script error. Some package operations were unsuccessful.
434           This may be an error in the packages or an incompatibility with
435           your system. This can be a partial error.
436
437       40  Sync error. Could not fetch some remotes from the network. This can
438           be a partial error.
439
440       50  Configuration error. Opam or system configuration doesn't allow
441           operation, and needs fixing.
442
443       60  Solver failure. The solver failed to return a sound answer. It can
444           be due to a broken external solver, or an error in solver
445           configuration.
446
447       99  Internal error. Something went wrong, likely due to a bug in opam
448           itself.
449
450       130 User interrupt. SIGINT was received, generally due to the user
451           pressing Ctrl-C.
452

FURTHER DOCUMENTATION

454       See https://opam.ocaml.org/doc.
455

AUTHORS

457       Vincent Bernardoff <vb@luminar.eu.org>
458       Raja Boujbel <raja.boujbel@ocamlpro.com>
459       Roberto Di Cosmo <roberto@dicosmo.org>
460       Thomas Gazagnaire <thomas@gazagnaire.org>
461       Louis Gesbert <louis.gesbert@ocamlpro.com>
462       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
463
464       Anil Madhavapeddy <anil@recoil.org>
465       Guillem Rieu <guillem.rieu@ocamlpro.com>
466       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
467       Frederic Tuong <tuong@users.gforge.inria.fr>
468

BUGS

470       Check bug reports at https://github.com/ocaml/opam/issues.
471
472
473
474Opam admin 2.1.1                                           OPAM ADMIN-CHECK(1)
Impressum