1OPAM ADMIN-ADD-HASHES(1) Opam admin Manual OPAM ADMIN-ADD-HASHES(1)
2
3
4
6 opam admin-add-hashes - Add archive hashes to an opam repository.
7
9 opam admin add-hashes [OPTION]… HASH_ALGO…
10
12 This command scans through package definitions, and add hashes as
13 requested (fetching the archives if required). A cache is generated in
14 /builddir/.cache/opam-hash-cache for subsequent runs.
15
17 HASH_ALGO (required)
18 The hash, or hashes to be added
19
21 --no
22 Answer no to all opam yes/no questions without prompting. See also
23 --confirm-level. This is equivalent to setting $OPAMNO to "true".
24
25 -p PACKAGES, --packages=PACKAGES
26 Only add hashes for the given packages
27
28 --replace
29 Replace the existing hashes rather than adding to them
30
31 -y, --yes
32 Answer yes to all opam yes/no questions without prompting. See also
33 --confirm-level. This is equivalent to setting $OPAMYES to "true".
34
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 This is equivalent to setting $OPAMBESTEFFORT environment variable.
43
44 --cli=MAJOR.MINOR (absent=2.1)
45 Use the command-line interface syntax and semantics of MAJOR.MINOR.
46 Intended for any persistent use of opam (scripts, blog posts,
47 etc.), any version of opam in the same MAJOR series will behave as
48 for the specified MINOR release. The flag was not available in opam
49 2.0, so to select the 2.0 CLI, set the OPAMCLI environment variable
50 to 2.0 instead of using this parameter.
51
52 --color=WHEN
53 Colorize the output. WHEN must be one of always, never or auto.
54
55 --confirm-level=LEVEL
56 Confirmation level, LEVEL must be one of ask, no, yes or
57 unsafe-yes. Can be specified more than once. If --yes or --no are
58 also given, the value of the last --confirm-level is taken into
59 account. This is equivalent to setting $OPAMCONFIRMLEVEL`.
60
61 --criteria=CRITERIA
62 Specify user preferences for dependency solving for this run.
63 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
64 on the supported language, and the external solvers available, see
65 http://opam.ocaml.org/doc/External_solvers.html. A general guide to
66 using solver preferences can be found at
67 http://www.dicosmo.org/Articles/usercriteria.pdf.
68
69 --cudf=FILENAME
70 Debug option: Save the CUDF requests sent to the solver to
71 FILENAME-<n>.cudf.
72
73 --debug
74 Print debug message to stderr. This is equivalent to setting
75 $OPAMDEBUG to "true".
76
77 --debug-level=LEVEL
78 Like --debug, but allows specifying the debug level (--debug sets
79 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
80
81 --git-version
82 Print the git version of opam, if set (i.e. you are using a
83 development version), and exit.
84
85 --help[=FMT] (default=auto)
86 Show this help in format FMT. The value FMT must be one of auto,
87 pager, groff or plain. With auto, the format is pager or plain
88 whenever the TERM env var is dumb or undefined.
89
90 --ignore-pin-depends
91 Ignore extra pins required by packages that get pinned, either
92 manually through opam pin or through opam install DIR. This is
93 equivalent to setting IGNOREPINDEPENDS=true.
94
95 --json=FILENAME
96 Save the results of the opam run in a computer-readable file. If
97 the filename contains the character `%', it will be replaced by an
98 index that doesn't overwrite an existing file. Similar to setting
99 the $OPAMJSON variable.
100
101 --no-aspcud
102 Removed in 2.1.
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. This is equivalent to set environment variable $OPAMSAFE.
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,
131 builtin-dummy-z3-solver, builtin-dummy-0install-solver, aspcud,
132 mccs, aspcud-old, packup), or a custom command that should contain
133 the variables %{input}%, %{output}%, %{criteria}%, and optionally
134 %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
135
136 --strict
137 Fail whenever an error is found in a package definition or a
138 configuration file. The default is to continue silently if
139 possible.
140
141 --switch=SWITCH
142 Use SWITCH as the current compiler switch. This is equivalent to
143 setting $OPAMSWITCH to SWITCH.
144
145 --use-internal-solver
146 Disable any external solver, and use the built-in one (this
147 requires that opam has been compiled with a built-in solver). This
148 is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
149
150 -v, --verbose
151 Be more verbose. One -v shows all package commands, repeat to also
152 display commands called internally (e.g. tar, curl, patch etc.)
153 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
154
155 --version
156 Show version information.
157
158 -w, --working-dir
159 Whenever updating packages that are bound to a local,
160 version-controlled directory, update to the current working state
161 of their source instead of the last committed state, or the ref
162 they are pointing to. As source directory is copied as it is, if it
163 isn't clean it may result on a opam build failure.This only affects
164 packages explicitly listed on the command-line.It can also be set
165 with $OPAMWORKINGDIR.
166
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 OPAMALLPARENS surround all filters with parenthesis.
173
174 OPAMASSUMEDEPEXTS see option `--assume-depexts'.
175
176 OPAMAUTOREMOVE see remove option `--auto-remove'.
177
178 OPAMBESTEFFORT see option `--best-effort'.
179
180 OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
181 the criteria when the `--best-effort' option is set, and is expected to
182 maximise the `opam-query' property in the solution.
183
184 OPAMBUILDDOC Removed in 2.1.
185
186 OPAMBUILDTEST Removed in 2.1.
187
188 OPAMCLI see option `--cli'.
189
190 OPAMCOLOR when set to always or never, sets a default value for the
191 `--color' option.
192
193 OPAMCONFIRMLEVEL see option `--confirm-level`. OPAMCONFIRMLEVEL has
194 priority over OPAMYES and OPAMNO.
195
196 OPAMCRITERIA specifies user preferences for dependency solving. The
197 default value depends on the solver version, use `config report' to
198 know the current setting. See also option --criteria.
199
200 OPAMCUDFFILE save the cudf graph to file-actions-explicit.dot.
201
202 OPAMCUDFTRIM controls the filtering of unrelated packages during CUDF
203 preprocessing.
204
205 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
206 for more options.
207
208 OPAMDEBUG see options `--debug' and `--debug-level'.
209
210 OPAMDEBUGSECTIONS if set, limits debug messages to the space-separated
211 list of sections. Sections can optionally have a specific debug level
212 (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use
213 `--debug-level'.
214
215 OPAMDIGDEPTH defines how aggressive the lookup for conflicts during
216 CUDF preprocessing is.
217
218 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
219
220 OPAMDROPWORKINGDIR overrides packages previously updated with
221 --working-dir on update. Without this variable set, opam would keep
222 them unchanged unless explicitly named on the command-line.
223
224 OPAMDRYRUN see option `--dry-run'.
225
226 OPAMEDITOR sets the editor to use for opam file editing, overrides
227 $EDITOR and $VISUAL.
228
229 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
230 fails. 0 to print all.
231
232 OPAMEXTERNALSOLVER see option `--solver'.
233
234 OPAMFAKE see option `--fake'.
235
236 OPAMFETCH specifies how to download files: either `wget', `curl' or a
237 custom command where variables %{url}%, %{out}%, %{retry}%,
238 %{compress}% and %{checksum}% will be replaced. Overrides the
239 'download-command' value from the main config file.
240
241 OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup.
242
243 OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on'.
244
245 OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends'.
246
247 OPAMINPLACEBUILD see option `--inplace-build'.
248
249 OPAMJOBS sets the maximum number of parallel workers to run.
250
251 OPAMJSON log json output to the given file (use character `%' to index
252 the files).
253
254 OPAMKEEPBUILDDIR see install option `--keep-build-dir'.
255
256 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
257 some backups. This skips some finalisers and may also help to get more
258 reliable backtraces.
259
260 OPAMLOCKED combination of `--locked' and `--lock-suffix' options.
261
262 OPAMLOGS logdir sets log directory, default is a temporary directory in
263 /tmp
264
265 OPAMMAKECMD set the system make command to use.
266
267 OPAMMERGEOUT merge process outputs, stderr on stdout.
268
269 OPAMNO answer no to any question asked, see options `--no` and
270 `--confirm-level`. OPAMNO is ignored if either OPAMCONFIRMLEVEL or
271 OPAMYES is set.
272
273 OPAMNOAGGREGATE with `opam admin check', don't aggregate packages.
274
275 OPAMNOASPCUD Deprecated.
276
277 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
278 in an earlier format to the current one, on 'update' or 'init'.
279
280 OPAMNOCHECKSUMS enables option --no-checksums when available.
281
282 OPAMNODEPEXTS disables system dependencies handling, see option
283 `--no-depexts'.
284
285 OPAMNOENVNOTICE Internal.
286
287 OPAMNOSELFUPGRADE see option `--no-self-upgrade'
288
289 OPAMPINKINDAUTO sets whether version control systems should be detected
290 when pinning to a local path. Enabled by default since 1.3.0.
291
292 OPAMPRECISETRACKING fine grain tracking of directories.
293
294 OPAMPREPRO set this to false to disable CUDF preprocessing. Less
295 efficient, but might help debugging solver issue.
296
297 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
298 available (e.g. for `opam install').
299
300 OPAMRETRIES sets the number of tries before failing downloads.
301
302 OPAMREUSEBUILDDIR see option `--reuse-build-dir'.
303
304 OPAMROOT see option `--root'. This is automatically set by `opam env
305 --root=DIR --set-root'.
306
307 OPAMROOTISOK don't complain when running as root.
308
309 OPAMSAFE see option `--safe'.
310
311 OPAMSHOW see option `--show'.
312
313 OPAMSKIPUPDATE see option `--skip-updates'.
314
315 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
316 compatibility testing only.
317
318 OPAMSOLVERALLOWSUBOPTIMAL (default `true') allows some solvers to still
319 return a solution when they reach timeout; while the solution remains
320 assured to be consistent, there is no guarantee in this case that it
321 fits the expected optimisation criteria. If `true', opam willcontinue
322 with a warning, if `false' a timeout is an error. Currently only the
323 builtin-z3 backend handles this degraded case.
324
325 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
326 60.0, set to 0 for unlimited. Note that all solvers may not support
327 this option.
328
329 OPAMSTATS display stats at the end of command.
330
331 OPAMSTATUSLINE display a dynamic status line showing what's currently
332 going on on the terminal. (one of one of always, never or auto)
333
334 OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.).
335
336 OPAMSWITCH see option `--switch'. Automatically set by `opam env
337 --switch=SWITCH --set-switch'.
338
339 OPAMUNLOCKBASE see install option `--unlock-base'.
340
341 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
342 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
343 are set. See also option --criteria.
344
345 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
346
347 OPAMUSEOPENSSL force openssl use for hash computing.
348
349 OPAMUTF8 use UTF8 characters in output (one of one of always, never or
350 auto). By default `auto', which is determined from the locale).
351
352 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
353 Implies OPAMUTF8. This is set by default on OSX only.
354
355 OPAMVALIDATIONHOOK if set, uses the `%{hook%}' command to validate an
356 opam repository update.
357
358 OPAMVERBOSE see option `--verbose'.
359
360 OPAMVERSIONLAGPOWER do not use.
361
362 OPAMWITHDOC see install option `--with-doc'.
363
364 OPAMWITHTEST see install option `--with-test.
365
366 OPAMWORKINGDIR see option `--working-dir'.
367
368 OPAMYES see options `--yes' and `--confirm-level`. OPAMYES has has
369 priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set.
370
371 OPAMVAR_var overrides the contents of the variable var when
372 substituting `%{var}%` strings in `opam` files.
373
374 OPAMVAR_package_var overrides the contents of the variable package:var
375 when substituting `%{package:var}%` strings in `opam` files.
376
378 All scripts and programmatic invocations of opam should use `--cli' in
379 order to ensure that they work seamlessly with future versions of the
380 opam client. Additionally, blog posts or other documentation can
381 benefit, as it prevents information from becoming stale.
382
383 Although opam only supports roots (~/.opam/) for the current version,
384 it does provide backwards compatibility for its command-line interface.
385
386 Since CLI version support was only added in opam 2.1, use OPAMCLI to
387 select 2.0 support (as opam 2.0 will just ignore it), and `--cli=2.1'
388 for 2.1 (or later) versions, since an environment variable controlling
389 the parsing of syntax is brittle. To this end, opam displays a warning
390 if OPAMCLI specifies a valid version other than 2.0, and also if
391 `--cli=2.0' is specified.
392
393 The command-line version is selected by using the `--cli' option or the
394 OPAMCLI environment variable. `--cli' may be specified morethan once,
395 where the last instance takes precedence. OPAMCLI is only inspected if
396 `--cli' is not given.
397
399 As an exception to the following, the `exec' command returns 127 if the
400 command was not found or couldn't be executed, and the command's exit
401 value otherwise.
402
403 0 Success, or true for boolean queries.
404
405 1 False. Returned when a boolean return value is expected, e.g. when
406 running with --check, or for queries like opam lint.
407
408 2 Bad command-line arguments, or command-line arguments pointing to
409 an invalid context (e.g. file not following the expected format).
410
411 5 Not found. You requested something (package, version, repository,
412 etc.) that couldn't be found.
413
414 10 Aborted. The operation required confirmation, which wasn't given.
415
416 15 Could not acquire the locks required for the operation.
417
418 20 There is no solution to the user request. This can be caused by
419 asking to install two incompatible packages, for example.
420
421 30 Error in package definition, or other metadata files. Using
422 --strict raises this error more often.
423
424 31 Package script error. Some package operations were unsuccessful.
425 This may be an error in the packages or an incompatibility with
426 your system. This can be a partial error.
427
428 40 Sync error. Could not fetch some remotes from the network. This can
429 be a partial error.
430
431 50 Configuration error. Opam or system configuration doesn't allow
432 operation, and needs fixing.
433
434 60 Solver failure. The solver failed to return a sound answer. It can
435 be due to a broken external solver, or an error in solver
436 configuration.
437
438 99 Internal error. Something went wrong, likely due to a bug in opam
439 itself.
440
441 130 User interrupt. SIGINT was received, generally due to the user
442 pressing Ctrl-C.
443
445 See https://opam.ocaml.org/doc.
446
448 Vincent Bernardoff <vb@luminar.eu.org>
449 Raja Boujbel <raja.boujbel@ocamlpro.com>
450 Roberto Di Cosmo <roberto@dicosmo.org>
451 Thomas Gazagnaire <thomas@gazagnaire.org>
452 Louis Gesbert <louis.gesbert@ocamlpro.com>
453 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
454 Anil Madhavapeddy <anil@recoil.org>
455 Guillem Rieu <guillem.rieu@ocamlpro.com>
456 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
457 Frederic Tuong <tuong@users.gforge.inria.fr>
458
460 Check bug reports at https://github.com/ocaml/opam/issues.
461
462
463
464Opam admin 2.1.3 OPAM ADMIN-ADD-HASHES(1)