1opam-show(1) Opam Manual opam-show(1)
2
3
4
6 opam-show - Display information about specific packages.
7
9 opam show [OPTION]... [PACKAGES]...
10
12 This command displays the information block for the selected
13 package(s).
14
15 The information block consists of the name of the package, the
16 installed version if this package is installed in the currently
17 selected compiler, the list of available (installable) versions, and a
18 complete description.
19
20 opam list can be used to display the list of available packages as well
21 as a short description for each.
22
23 Paths to package definition files or to directories containing package
24 definitions can also be specified, in which case the corresponding
25 metadata will be shown.
26
28 PACKAGES
29 List of package names, with an optional version or constraint, e.g
30 `pkg', `pkg.1.0' or `pkg>=0.5' ; or files or directory names
31 containing package description, with explicit directory (e.g.
32 `./foo.opam' or `.')
33
35 --empty-fields
36 Show fields that are empty. This is implied when --field is given.
37
38 -f FIELDS, --field=FIELDS
39 Only display the values of these fields. Fields can be selected
40 among name, version, package, synopsis, synopsis-or-target,
41 description, <field>:, installed-version, pin, source-hash,
42 opam-file, all-installed-versions, available-versions,
43 all-versions, repository, installed-files, vc-ref, depexts.
44 Multiple fields can be separated with commas, in which case field
45 titles will be printed; the raw value of any opam-file field can be
46 queried by suffixing a colon character (:), e.g. --field=depopts:.
47
48 --file=FILE
49 DEPRECATED: use an explicit path argument as package instead. Get
50 package information from the given FILE instead of from known
51 packages. This implies --raw unless --fields is used. Only raw
52 opam-file fields can be queried.
53
54 --list-files
55 List the files installed by the package. Equivalent to
56 --field=installed-files, and only available for installed packages
57
58 --no-lint
59 Don't output linting warnings or errors when reading from files
60
61 --normalise
62 Print the values of opam fields normalised (no newlines, no
63 implicit brackets)
64
65 --raw
66 Print the raw opam file for this package
67
68 --where
69 Print the location of the opam file used for this package
70
72 These options are common to all commands.
73
74 --best-effort
75 Don't fail if all requested packages can't be installed: try to
76 install as many as possible. Note that not all external solvers may
77 support this option (recent versions of aspcud or mccs should).
78
79 --color=WHEN
80 Colorize the output. WHEN must be one of `always', `never' or
81 `auto'.
82
83 --criteria=CRITERIA
84 Specify user preferences for dependency solving for this run.
85 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
86 on the supported language, and the external solvers available, see
87 http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html. A
88 general guide to using solver preferences can be found at
89 http://www.dicosmo.org/Articles/usercriteria.pdf.
90
91 --cudf=FILENAME
92 Debug option: Save the CUDF requests sent to the solver to
93 FILENAME-<n>.cudf.
94
95 --debug
96 Print debug message to stderr. This is equivalent to setting
97 $OPAMDEBUG to "true".
98
99 --debug-level=LEVEL
100 Like --debug, but allows specifying the debug level (--debug sets
101 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
102
103 --git-version
104 Print the git version of opam, if set (i.e. you are using a
105 development version), and exit.
106
107 --help[=FMT] (default=auto)
108 Show this help in format FMT. The value FMT must be one of `auto',
109 `pager', `groff' or `plain'. With `auto', the format is `pager` or
110 `plain' whenever the TERM env var is `dumb' or undefined.
111
112 --ignore-pin-depends
113 Ignore extra pins required by packages that get pinned, either
114 manually through opam pin or through opam install DIR. This is
115 equivalent to setting IGNOREPINDEPENDS=true.
116
117 --json=FILENAME
118 Save the results of the opam run in a computer-readable file. If
119 the filename contains the character `%', it will be replaced by an
120 index that doesn't overwrite an existing file. Similar to setting
121 the $OPAMJSON variable.
122
123 --no-auto-upgrade
124 When configuring or updating a repository that is written for an
125 earlier opam version (1.2), opam internally converts it to the
126 current format. This disables this behaviour. Note that
127 repositories should define their format version in a 'repo' file at
128 their root, or they will be assumed to be in the older format. It
129 is, in any case, preferable to upgrade the repositories manually
130 using opam admin upgrade [--mirror URL] when possible.
131
132 --no-self-upgrade
133 Opam will replace itself with a newer binary found at OPAMROOT/opam
134 if present. This disables this behaviour.
135
136 -q, --quiet
137 Disables --verbose.
138
139 --root=ROOT
140 Use ROOT as the current root path. This is equivalent to setting
141 $OPAMROOT to ROOT.
142
143 --safe, --readonly
144 Make sure nothing will be automatically updated or rewritten.
145 Useful for calling from completion scripts, for example. Will fail
146 whenever such an operation is needed ; also avoids waiting for
147 locks, skips interactive questions and overrides the $OPAMDEBUG
148 variable.
149
150 --solver=CMD
151 Specify the CUDF solver to use for resolving package installation
152 problems. This is either a predefined solver (this version of opam
153 supports builtin-mccs+lp(), builtin-mccs+glpk, aspcud, mccs,
154 aspcud-old, packup), or a custom command that should contain the
155 variables %{input}%, %{output}%, %{criteria}%, and optionally
156 %{timeout}%.
157
158 --strict
159 Fail whenever an error is found in a package definition or a
160 configuration file. The default is to continue silently if
161 possible.
162
163 --switch=SWITCH
164 Use SWITCH as the current compiler switch. This is equivalent to
165 setting $OPAMSWITCH to SWITCH.
166
167 --use-internal-solver, --no-aspcud
168 Disable any external solver, and use the built-in one (this
169 requires that opam has been compiled with a built-in solver).
170
171 -v, --verbose
172 Be more verbose. One -v shows all package commands, repeat to also
173 display commands called internally (e.g. tar, curl, patch etc.)
174 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
175
176 --version
177 Show version information.
178
179 -w, --working-dir
180 Whenever updating packages that are bound to a local,
181 version-controlled directory, update to the current working state
182 of their source instead of the last committed state, or the ref
183 they are pointing to. This only affects packages explicitly listed
184 on the command-line.
185
186 -y, --yes
187 Answer yes to all yes/no questions without prompting. This is
188 equivalent to setting $OPAMYES to "true".
189
191 Opam makes use of the environment variables listed here. Boolean
192 variables should be set to "0", "no", "false" or the empty string to
193 disable, "1", "yes" or "true" to enable.
194
195 OPAMCOLOR, when set to always or never, sets a default value for the
196 --color option.
197
198 OPAMCRITERIA specifies user preferences for dependency solving. The
199 default value depends on the solver version, use `config report` to
200 know the current setting. See also option --criteria
201
202 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
203 for more options.
204
205 OPAMDEBUG see options `--debug' and `--debug-level'.
206
207 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
208
209 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
210 fails. 0 to print all.
211
212 OPAMEXTERNALSOLVER see option `--solver'.
213
214 OPAMFETCH specifies how to download files: either `wget', `curl' or a
215 custom command where variables %{url}%, %{out}%, %{retry}%,
216 %{compress}% and %{checksum}% will be replaced. Overrides the
217 'download-command' value from the main config file.
218
219 OPAMJOBS sets the maximum number of parallel workers to run.
220
221 OPAMJSON log json output to the given file (use character `%' to index
222 the files)
223
224 OPAMLOCK see option `--lock'.
225
226 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
227 in an earlier format to the current one, on 'update' or 'init'.
228
229 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
230 some backups. This skips some finalisers and may also help to get more
231 reliable backtraces
232
233 OPAMLOCKRETRIES sets the number of tries after which OPAM gives up
234 acquiring its lock and fails. <= 0 means infinite wait.
235
236 OPAMNO answer no to any question asked.
237
238 OPAMNOASPCUD see option `--no-aspcud'.
239
240 OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
241
242 OPAMPINKINDAUTO sets whether version control systems should be detected
243 when pinning to a local path. Enabled by default since 1.3.0.
244
245 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
246 available (e.g. for `opam install`).
247
248 OPAMRETRY sets the number of tries before failing downloads.
249
250 OPAMROOT see option `--root'. This is automatically set by `opam env
251 --root=DIR --set-root'.
252
253 OPAMROOTISOK don't complain when running as root.
254
255 OPAMSAFE see option `--safe'
256
257 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
258 compatibility testing only.
259
260 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
261 60.0, set to 0 for unlimited. Note that all solvers may not support
262 this option.
263
264 OPAMSTATUSLINE display a dynamic status line showing what's currently
265 going on on the terminal. (one of one of `always', `never' or `auto')
266
267 OPAMSWITCH see option `--switch'. Automatically set by `opam env
268 --switch=SWITCH --set-switch'.
269
270 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
271 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
272 are set. See also option --criteria
273
274 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
275
276 OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
277 or `auto'). By default `auto', which is determined from the locale).
278
279 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
280 Implies OPAMUTF8. This is set by default on OSX only.
281
282 OPAMVAR_var overrides the contents of the variable var when
283 substituting `%{var}%` strings in `opam` files.
284
285 OPAMVAR_package_var overrides the contents of the variable package:var
286 when substituting `%{package:var}%` strings in `opam` files.
287
288 OPAMVERBOSE see option `--verbose'.
289
290 OPAMYES see option `--yes'.
291
293 As an exception to the following, the `exec' command returns 127 if the
294 command was not found or couldn't be executed, and the command's exit
295 value otherwise.
296
297 0 Success, or true for boolean queries.
298
299 1 False. Returned when a boolean return value is expected, e.g. when
300 running with --check, or for queries like opam lint.
301
302 2 Bad command-line arguments, or command-line arguments pointing to
303 an invalid context (e.g. file not following the expected format).
304
305 5 Not found. You requested something (package, version, repository,
306 etc.) that couldn't be found.
307
308 10 Aborted. The operation required confirmation, which wasn't given.
309
310 15 Could not acquire the locks required for the operation.
311
312 20 There is no solution to the user request. This can be caused by
313 asking to install two incompatible packages, for example.
314
315 30 Error in package definition, or other metadata files. Using
316 --strict raises this error more often.
317
318 31 Package script error. Some package operations were unsuccessful.
319 This may be an error in the packages or an incompatibility with
320 your system. This can be a partial error.
321
322 40 Sync error. Could not fetch some remotes from the network. This can
323 be a partial error.
324
325 50 Configuration error. Opam or system configuration doesn't allow
326 operation, and needs fixing.
327
328 60 Solver failure. The solver failed to return a sound answer. It can
329 be due to a broken external solver, or an error in solver
330 configuration.
331
332 99 Internal error. Something went wrong, likely due to a bug in opam
333 itself.
334
335 130 User interrupt. SIGINT was received, generally due to the user
336 pressing Ctrl-C.
337
339 See https://opam.ocaml.org/doc.
340
342 Vincent Bernardoff <vb@luminar.eu.org>
343 Raja Boujbel <raja.boujbel@ocamlpro.com>
344 Roberto Di Cosmo <roberto@dicosmo.org>
345 Thomas Gazagnaire <thomas@gazagnaire.org>
346 Louis Gesbert <louis.gesbert@ocamlpro.com>
347 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
348 Anil Madhavapeddy <anil@recoil.org>
349 Guillem Rieu <guillem.rieu@ocamlpro.com>
350 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
351 Frederic Tuong <tuong@users.gforge.inria.fr>
352
354 Check bug reports at https://github.com/ocaml/opam/issues.
355
356
357
358Opam 2.0.1 opam-show(1)