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