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 This is equivalent to setting $OPAMBESTEFFORT environment variable.
38
39 --color=WHEN
40 Colorize the output. WHEN must be one of `always', `never' or
41 `auto'.
42
43 --criteria=CRITERIA
44 Specify user preferences for dependency solving for this run.
45 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
46 on the supported language, and the external solvers available, see
47 http://opam.ocaml.org/doc/External_solvers.html. A general guide to
48 using solver preferences can be found at
49 http://www.dicosmo.org/Articles/usercriteria.pdf.
50
51 --cudf=FILENAME
52 Debug option: Save the CUDF requests sent to the solver to
53 FILENAME-<n>.cudf.
54
55 --debug
56 Print debug message to stderr. This is equivalent to setting
57 $OPAMDEBUG to "true".
58
59 --debug-level=LEVEL
60 Like --debug, but allows specifying the debug level (--debug sets
61 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
62
63 --git-version
64 Print the git version of opam, if set (i.e. you are using a
65 development version), and exit.
66
67 --help[=FMT] (default=auto)
68 Show this help in format FMT. The value FMT must be one of `auto',
69 `pager', `groff' or `plain'. With `auto', the format is `pager` or
70 `plain' whenever the TERM env var is `dumb' or undefined.
71
72 --ignore-pin-depends
73 Ignore extra pins required by packages that get pinned, either
74 manually through opam pin or through opam install DIR. This is
75 equivalent to setting IGNOREPINDEPENDS=true.
76
77 --json=FILENAME
78 Save the results of the opam run in a computer-readable file. If
79 the filename contains the character `%', it will be replaced by an
80 index that doesn't overwrite an existing file. Similar to setting
81 the $OPAMJSON variable.
82
83 --no-aspcud
84 Deprecated.
85
86 --no-auto-upgrade
87 When configuring or updating a repository that is written for an
88 earlier opam version (1.2), opam internally converts it to the
89 current format. This disables this behaviour. Note that
90 repositories should define their format version in a 'repo' file at
91 their root, or they will be assumed to be in the older format. It
92 is, in any case, preferable to upgrade the repositories manually
93 using opam admin upgrade [--mirror URL] when possible.
94
95 -q, --quiet
96 Disables --verbose.
97
98 --root=ROOT
99 Use ROOT as the current root path. This is equivalent to setting
100 $OPAMROOT to ROOT.
101
102 --safe, --readonly
103 Make sure nothing will be automatically updated or rewritten.
104 Useful for calling from completion scripts, for example. Will fail
105 whenever such an operation is needed ; also avoids waiting for
106 locks, skips interactive questions and overrides the $OPAMDEBUG
107 variable. This is equivalent to set environment variable $OPAMSAFE.
108
109 --solver=CMD
110 Specify the CUDF solver to use for resolving package installation
111 problems. This is either a predefined solver (this version of opam
112 supports builtin-mccs+lp(), builtin-mccs+glpk, aspcud, mccs,
113 aspcud-old, packup), or a custom command that should contain the
114 variables %{input}%, %{output}%, %{criteria}%, and optionally
115 %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
116
117 --strict
118 Fail whenever an error is found in a package definition or a
119 configuration file. The default is to continue silently if
120 possible.
121
122 --switch=SWITCH
123 Use SWITCH as the current compiler switch. This is equivalent to
124 setting $OPAMSWITCH to SWITCH.
125
126 --use-internal-solver
127 Disable any external solver, and use the built-in one (this
128 requires that opam has been compiled with a built-in solver). This
129 is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
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.It can also be set with $OPAMWORKINGDIR.
145
146 -y, --yes
147 Answer yes to all yes/no questions without prompting. This is
148 equivalent to setting $OPAMYES to "true".
149
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 OPAMALLPARENS surround all filters with parenthesis
156
157 OPAMAUTOREMOVE see remove option `--auto-remove`
158
159 OPAMBESTEFFORT see option `--best-effort`
160
161 OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
162 the criteria when the `--best-effort` option is set, and is expected to
163 maximise the `opam-query` property in the solution
164
165 OPAMCOLOR, when set to always or never, sets a default value for the
166 --color option.
167
168 OPAMCRITERIA specifies user preferences for dependency solving. The
169 default value depends on the solver version, use `config report` to
170 know the current setting. See also option --criteria
171
172 OPAMCUDFFILE file save the cudf graph to file-actions-explicit.dot
173
174 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
175 for more options.
176
177 OPAMDEBUG see options `--debug' and `--debug-level'.
178
179 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
180
181 OPAMDRYRUN see option `--dry-run`
182
183 OPAMEDITOR sets the editor to use for opam file editing, overrides
184 $EDITOR and $VISUAL
185
186 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
187 fails. 0 to print all.
188
189 OPAMEXTERNALSOLVER see option `--solver'.
190
191 OPAMFAKE see option `--fake`
192
193 OPAMFETCH specifies how to download files: either `wget', `curl' or a
194 custom command where variables %{url}%, %{out}%, %{retry}%,
195 %{compress}% and %{checksum}% will be replaced. Overrides the
196 'download-command' value from the main config file.
197
198 OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup
199
200 OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on`
201
202 OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends`
203
204 OPAMJOBS sets the maximum number of parallel workers to run.
205
206 OPAMJSON log json output to the given file (use character `%' to index
207 the files)
208
209 OPAMLOCKED see install option `--locked`
210
211 OPAMLOGS logdir sets log directory, default is a temporary directory in
212 /tmp
213
214 OPAMMAKECMD set the system make command to use
215
216 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
217 in an earlier format to the current one, on 'update' or 'init'.
218
219 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
220 some backups. This skips some finalisers and may also help to get more
221 reliable backtraces
222
223 OPAMLOCKRETRIES sets the number of tries after which opam gives up
224 acquiring its lock and fails. <= 0 means infinite wait.
225
226 OPAMMERGEOUT merge process outputs, stderr on stdout
227
228 OPAMNO answer no to any question asked.
229
230 OPAMNOASPCUD Deprecated.
231
232 OPAMNOCHECKSUMS enables option --no-checksums when available.
233
234 OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
235
236 OPAMPINKINDAUTO sets whether version control systems should be detected
237 when pinning to a local path. Enabled by default since 1.3.0.
238
239 OPAMPRECISETRACKING fine grain tracking of directories
240
241 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
242 available (e.g. for `opam install`).
243
244 OPAMRETRES sets the number of tries before failing downloads.
245
246 OPAMROOT see option `--root'. This is automatically set by `opam env
247 --root=DIR --set-root'.
248
249 OPAMROOTISOK don't complain when running as root.
250
251 OPAMSAFE see option `--safe'
252
253 OPAMSHOW see option `--show`
254
255 OPAMSKIPUPDATE see option `--skip-updates`
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 OPAMSTATS display stats at the end of command
268
269 OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.)
270
271 OPAMSWITCH see option `--switch'. Automatically set by `opam env
272 --switch=SWITCH --set-switch'.
273
274 OPAMUNLOCKBASE see install option `--unlock-base`
275
276 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
277 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
278 are set. See also option --criteria
279
280 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
281
282 OPAMUSEOPENSSL force openssl use for hash computing
283
284 OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
285 or `auto'). By default `auto', which is determined from the locale).
286
287 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
288 Implies OPAMUTF8. This is set by default on OSX only.
289
290 OPAMVALIDATIONHOOK hook if set, uses the `%{hook%}` command to validate
291 an opam repository update
292
293 OPAMVAR_var overrides the contents of the variable var when
294 substituting `%{var}%` strings in `opam` files.
295
296 OPAMVAR_package_var overrides the contents of the variable package:var
297 when substituting `%{package:var}%` strings in `opam` files.
298
299 OPAMVERBOSE see option `--verbose'.
300
301 OPAMWORKINGDIR see option `--working-dir`
302
303 OPAMYES see option `--yes'.
304
306 As an exception to the following, the `exec' command returns 127 if the
307 command was not found or couldn't be executed, and the command's exit
308 value otherwise.
309
310 0 Success, or true for boolean queries.
311
312 1 False. Returned when a boolean return value is expected, e.g. when
313 running with --check, or for queries like opam lint.
314
315 2 Bad command-line arguments, or command-line arguments pointing to
316 an invalid context (e.g. file not following the expected format).
317
318 5 Not found. You requested something (package, version, repository,
319 etc.) that couldn't be found.
320
321 10 Aborted. The operation required confirmation, which wasn't given.
322
323 15 Could not acquire the locks required for the operation.
324
325 20 There is no solution to the user request. This can be caused by
326 asking to install two incompatible packages, for example.
327
328 30 Error in package definition, or other metadata files. Using
329 --strict raises this error more often.
330
331 31 Package script error. Some package operations were unsuccessful.
332 This may be an error in the packages or an incompatibility with
333 your system. This can be a partial error.
334
335 40 Sync error. Could not fetch some remotes from the network. This can
336 be a partial error.
337
338 50 Configuration error. Opam or system configuration doesn't allow
339 operation, and needs fixing.
340
341 60 Solver failure. The solver failed to return a sound answer. It can
342 be due to a broken external solver, or an error in solver
343 configuration.
344
345 99 Internal error. Something went wrong, likely due to a bug in opam
346 itself.
347
348 130 User interrupt. SIGINT was received, generally due to the user
349 pressing Ctrl-C.
350
352 See https://opam.ocaml.org/doc.
353
355 Vincent Bernardoff <vb@luminar.eu.org>
356 Raja Boujbel <raja.boujbel@ocamlpro.com>
357 Roberto Di Cosmo <roberto@dicosmo.org>
358 Thomas Gazagnaire <thomas@gazagnaire.org>
359 Louis Gesbert <louis.gesbert@ocamlpro.com>
360 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
361 Anil Madhavapeddy <anil@recoil.org>
362 Guillem Rieu <guillem.rieu@ocamlpro.com>
363 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
364 Frederic Tuong <tuong@users.gforge.inria.fr>
365
367 Check bug reports at https://github.com/ocaml/opam/issues.
368
369
370
371Opam admin 2.0.4 OPAM ADMIN-UPGRADE(1)