1opam admin(1)                  Opam admin Manual                 opam admin(1)
2
3
4

NAME

6       opam admin - Tools for repository administrators
7

SYNOPSIS

9       opam admin COMMAND ...
10

DESCRIPTION

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

COMMANDS

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

COMMAND ALIASES

49       make
50           An alias for index.
51

COMMON OPTIONS

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

ENVIRONMENT VARIABLES

168       Opam makes use of the environment variables listed here. Boolean
169       variables should be set to "0", "no", "false" or the empty string to
170       disable, "1", "yes" or "true" to enable.
171
172       OPAMCOLOR, when set to always or never, sets a default value for the
173       --color option.
174
175       OPAMCRITERIA specifies user preferences for dependency solving. The
176       default value depends on the solver version, use `config report` to
177       know the current setting. See also option --criteria
178
179       OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
180       for more options.
181
182       OPAMDEBUG see options `--debug' and `--debug-level'.
183
184       OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
185
186       OPAMERRLOGLEN sets the number of log lines printed when a sub-process
187       fails. 0 to print all.
188
189       OPAMEXTERNALSOLVER see option `--solver'.
190
191       OPAMFETCH specifies how to download files: either `wget', `curl' or a
192       custom command where variables %{url}%, %{out}%, %{retry}%,
193       %{compress}% and %{checksum}% will be replaced. Overrides the
194       'download-command' value from the main config file.
195
196       OPAMJOBS sets the maximum number of parallel workers to run.
197
198       OPAMJSON log json output to the given file (use character `%' to index
199       the files)
200
201       OPAMLOCK see option `--lock'.
202
203       OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
204       in an earlier format to the current one, on 'update' or 'init'.
205
206       OPAMKEEPLOGS tells opam to not remove some temporary command logs and
207       some backups. This skips some finalisers and may also help to get more
208       reliable backtraces
209
210       OPAMLOCKRETRIES sets the number of tries after which OPAM gives up
211       acquiring its lock and fails. <= 0 means infinite wait.
212
213       OPAMNO answer no to any question asked.
214
215       OPAMNOASPCUD see option `--no-aspcud'.
216
217       OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
218
219       OPAMPINKINDAUTO sets whether version control systems should be detected
220       when pinning to a local path. Enabled by default since 1.3.0.
221
222       OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
223       available (e.g. for `opam install`).
224
225       OPAMRETRY sets the number of tries before failing downloads.
226
227       OPAMROOT see option `--root'. This is automatically set by `opam env
228       --root=DIR --set-root'.
229
230       OPAMROOTISOK don't complain when running as root.
231
232       OPAMSAFE see option `--safe'
233
234       OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
235       compatibility testing only.
236
237       OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
238       60.0, set to 0 for unlimited. Note that all solvers may not support
239       this option.
240
241       OPAMSTATUSLINE display a dynamic status line showing what's currently
242       going on on the terminal. (one of one of `always', `never' or `auto')
243
244       OPAMSWITCH see option `--switch'. Automatically set by `opam env
245       --switch=SWITCH --set-switch'.
246
247       OPAMUPGRADECRITERIA specifies user preferences for dependency solving
248       when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
249       are set. See also option --criteria
250
251       OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
252
253       OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
254       or `auto'). By default `auto', which is determined from the locale).
255
256       OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
257       Implies OPAMUTF8. This is set by default on OSX only.
258
259       OPAMVAR_var overrides the contents of the variable var when
260       substituting `%{var}%` strings in `opam` files.
261
262       OPAMVAR_package_var overrides the contents of the variable package:var
263       when substituting `%{package:var}%` strings in `opam` files.
264
265       OPAMVERBOSE see option `--verbose'.
266
267       OPAMYES see option `--yes'.
268

EXIT STATUS

270       As an exception to the following, the `exec' command returns 127 if the
271       command was not found or couldn't be executed, and the command's exit
272       value otherwise.
273
274       0   Success, or true for boolean queries.
275
276       1   False. Returned when a boolean return value is expected, e.g. when
277           running with --check, or for queries like opam lint.
278
279       2   Bad command-line arguments, or command-line arguments pointing to
280           an invalid context (e.g. file not following the expected format).
281
282       5   Not found. You requested something (package, version, repository,
283           etc.) that couldn't be found.
284
285       10  Aborted. The operation required confirmation, which wasn't given.
286
287       15  Could not acquire the locks required for the operation.
288
289       20  There is no solution to the user request. This can be caused by
290           asking to install two incompatible packages, for example.
291
292       30  Error in package definition, or other metadata files. Using
293           --strict raises this error more often.
294
295       31  Package script error. Some package operations were unsuccessful.
296           This may be an error in the packages or an incompatibility with
297           your system. This can be a partial error.
298
299       40  Sync error. Could not fetch some remotes from the network. This can
300           be a partial error.
301
302       50  Configuration error. Opam or system configuration doesn't allow
303           operation, and needs fixing.
304
305       60  Solver failure. The solver failed to return a sound answer. It can
306           be due to a broken external solver, or an error in solver
307           configuration.
308
309       99  Internal error. Something went wrong, likely due to a bug in opam
310           itself.
311
312       130 User interrupt. SIGINT was received, generally due to the user
313           pressing Ctrl-C.
314

FURTHER DOCUMENTATION

316       See https://opam.ocaml.org/doc.
317

AUTHORS

319       Vincent Bernardoff <vb@luminar.eu.org>
320       Raja Boujbel <raja.boujbel@ocamlpro.com>
321       Roberto Di Cosmo <roberto@dicosmo.org>
322       Thomas Gazagnaire <thomas@gazagnaire.org>
323       Louis Gesbert <louis.gesbert@ocamlpro.com>
324       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
325       Anil Madhavapeddy <anil@recoil.org>
326       Guillem Rieu <guillem.rieu@ocamlpro.com>
327       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
328       Frederic Tuong <tuong@users.gforge.inria.fr>
329

BUGS

331       Check bug reports at https://github.com/ocaml/opam/issues.
332
333
334
335Opam admin 2.0.1                                                 opam admin(1)
Impressum