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

NAME

6       opam admin-index - Generate an inclusive index file for serving over
7       HTTP.
8

SYNOPSIS

10       opam admin index [OPTION]...
11

DESCRIPTION

13       An opam repository can be served over HTTP or HTTPS using any web
14       server. To that purpose, an inclusive index needs to be generated
15       first: this command generates the files the opam client will expect
16       when fetching from an HTTP remote, and should be run after any changes
17       are done to the contents of the repository.
18

OPTIONS

20       --full-urls-txt
21           Generate an inclusive 'urls.txt', for a repository that will be
22           used by opam versions earlier than 2.0.
23
24       --minimal-urls-txt
25           Generate a minimal 'urls.txt' file, that only includes the 'repo'
26           file. This allows opam versions earlier than 2.0 to read that file,
27           and be properly redirected to a repository dedicated to their
28           version, assuming a suitable 'redirect:' field is defined, instead
29           of failing. This is the default.
30
31       --no-urls-txt
32           Don't generate a 'urls.txt' file. That index file is no longer
33           needed from opam 2.0 on, but is still used by older versions.
34

COMMON OPTIONS

36       These options are common to all commands.
37
38       --best-effort
39           Don't fail if all requested packages can't be installed: try to
40           install as many as possible. Note that not all external solvers may
41           support this option (recent versions of aspcud or mccs should).
42
43       --color=WHEN
44           Colorize the output. WHEN must be one of `always', `never' or
45           `auto'.
46
47       --criteria=CRITERIA
48           Specify user preferences for dependency solving for this run.
49           Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
50           on the supported language, and the external solvers available, see
51           http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html. A
52           general guide to using solver preferences can be found at
53           http://www.dicosmo.org/Articles/usercriteria.pdf.
54
55       --cudf=FILENAME
56           Debug option: Save the CUDF requests sent to the solver to
57           FILENAME-<n>.cudf.
58
59       --debug
60           Print debug message to stderr. This is equivalent to setting
61           $OPAMDEBUG to "true".
62
63       --debug-level=LEVEL
64           Like --debug, but allows specifying the debug level (--debug sets
65           it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
66
67       --git-version
68           Print the git version of opam, if set (i.e. you are using a
69           development version), and exit.
70
71       --help[=FMT] (default=auto)
72           Show this help in format FMT. The value FMT must be one of `auto',
73           `pager', `groff' or `plain'. With `auto', the format is `pager` or
74           `plain' whenever the TERM env var is `dumb' or undefined.
75
76       --ignore-pin-depends
77           Ignore extra pins required by packages that get pinned, either
78           manually through opam pin or through opam install DIR. This is
79           equivalent to setting IGNOREPINDEPENDS=true.
80
81       --json=FILENAME
82           Save the results of the opam run in a computer-readable file. If
83           the filename contains the character `%', it will be replaced by an
84           index that doesn't overwrite an existing file. Similar to setting
85           the $OPAMJSON variable.
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.
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}%.
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, --no-aspcud
128           Disable any external solver, and use the built-in one (this
129           requires that opam has been compiled with a built-in solver).
130
131       -v, --verbose
132           Be more verbose. One -v shows all package commands, repeat to also
133           display commands called internally (e.g. tar, curl, patch etc.)
134           Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
135
136       --version
137           Show version information.
138
139       -w, --working-dir
140           Whenever updating packages that are bound to a local,
141           version-controlled directory, update to the current working state
142           of their source instead of the last committed state, or the ref
143           they are pointing to. This only affects packages explicitly listed
144           on the command-line.
145
146       -y, --yes
147           Answer yes to all yes/no questions without prompting. This is
148           equivalent to setting $OPAMYES to "true".
149

ENVIRONMENT VARIABLES

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

EXIT STATUS

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

FURTHER DOCUMENTATION

299       See https://opam.ocaml.org/doc.
300

AUTHORS

302       Vincent Bernardoff <vb@luminar.eu.org>
303       Raja Boujbel <raja.boujbel@ocamlpro.com>
304       Roberto Di Cosmo <roberto@dicosmo.org>
305       Thomas Gazagnaire <thomas@gazagnaire.org>
306       Louis Gesbert <louis.gesbert@ocamlpro.com>
307       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
308       Anil Madhavapeddy <anil@recoil.org>
309       Guillem Rieu <guillem.rieu@ocamlpro.com>
310       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
311       Frederic Tuong <tuong@users.gforge.inria.fr>
312

BUGS

314       Check bug reports at https://github.com/ocaml/opam/issues.
315
316
317
318Opam admin 2.0.1                                           opam admin-index(1)
Impressum