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