OPAM-ADMIN-MAKE(1)

πŸ’– NAME πŸ’–

opam admin-make β€” it's literally just an alias for index, bestie. That's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

opam admin make [--full-urls-txt] [--minimal-urls-txt] [--no-urls-txt]
[OPTION]…

🌸 DESCRIPTION 🌸

okay so real talk: opam admin make is an alias for opam admin index. same girl, different name. no cap. πŸ’…

so if you wanna know what's actually going on under the hood? run opam admin index --help and it'll spill all the tea. go look. go look right now. 🫢


✨ OPTIONS ✨

  • --full-urls-txt β€” generates an inclusive urls.txt, for a repository that's gonna get used by opam versions earlier than 2.0. so like, throwback-compatible, but make it complete. πŸ“œ
  • --minimal-urls-txt β€” generates a minimal urls.txt file that only includes the repo file. the whole point is that opam versions earlier than 2.0 can still read that file and get properly redirected to a repo made just for their version β€” assuming a suitable redirect: field is defined β€” instead of just, like, failing and crying about it. 😭 this one is the default, so it's what you get if you don't say anything. πŸ‘‘
  • --no-urls-txt β€” don't generate a urls.txt file at all. that index file isn't needed from opam 2.0 onwards, but bestie, older versions still use it, so be careful before you ghost it. πŸ’€

🌈 COMMON OPTIONS 🌈

these bad boys are common to all commands. same energy everywhere. so iconic.
  • --best-effort β€” don't fail just because all requested packages can't be installed: try to install as many as possible instead. ngl, not all external solvers support this (recent versions of aspcud or mccs should though). this is the equivalent of setting the $OPAMBESTEFFORT environment variable. 🫢
  • --cli=MAJOR.MINOR (absent=2.6) β€” use the command-line interface syntax and semantics of MAJOR.MINOR. it's intended for any persistent use of opam (scripts, blog posts, etc.), and any version of opam in the same MAJOR series will behave as for the specified MINOR release. heads up: the flag wasn't available in opam 2.0, so to select the 2.0 CLI, set the OPAMCLI environment variable to 2.0 instead of using this parameter. πŸ•°οΈ
  • --color=WHEN β€” colorize the output. WHEN has to be one of always, never or auto. that's it. serve. πŸŽ€
  • --confirm-level=LEVEL β€” confirmation level, LEVEL must be one of ask, no, yes or unsafe-yes. can be specified more than once. if --yes or --no are also given, the value of the last --confirm-level is taken into account. this is equivalent to setting $OPAMCONFIRMLEVEL. πŸ’…
  • --criteria=CRITERIA β€” specify user preferences for dependency solving for this run. overrides $OPAMCRITERIA, $OPAMFIXUPCRITERIA and $OPAMUPGRADECRITERIA. for details on the supported language and the external solvers available, see http://opam.ocaml.org/doc/External_solvers.html. a general guide to using solver preferences lives at http://www.dicosmo.org/Articles/usercriteria.pdf. πŸ“š
  • --cudf=FILENAME β€” debug option, bestie: save the CUDF requests sent to the solver to FILENAME-<n>.cudf where <n> is the n-th call to the solver during the opam run. πŸ§ͺ
  • --debug β€” print debug messages to stderr. this is equivalent to setting $OPAMDEBUG to "true". πŸͺ²
  • --debug-level=LEVEL β€” like --debug, but lets you specify the debug level (--debug sets it to 1). equivalent to setting $OPAMDEBUG to a positive integer. πŸ”
  • --git-version β€” print the git version of opam, if set (i.e. you're using a development version), and exit. main character energy only. πŸ‘‘
  • --help[=FMT] (default=auto) β€” show this help in format FMT. the value FMT must be one of auto, pager, groff or plain. with auto, the format is pager or plain whenever the TERM env var is dumb or undefined. πŸ™ˆ
  • --ignore-pin-depends β€” ignore extra pins required by packages that get pinned, either manually through opam pin or through opam install DIR. this is equivalent to setting IGNOREPINDEPENDS=true. πŸ“Œ
  • --json=FILENAME β€” save the results of the opam run in a computer-readable file. if the filename contains the character %, it will be replaced by an index that doesn't overwrite an existing file. similar to setting the $OPAMJSON variable. πŸ€–
  • --no β€” answer no to all opam yes/no questions without prompting. see also --confirm-level. this is equivalent to setting $OPAMNO to "true". 🚫
  • --no-aspcud β€” removed in 2.1. it's gone, she left the chat. πŸ’€
  • --no-auto-upgrade β€” when configuring or updating a repository that's written for an earlier opam version (1.2), opam internally converts it to the current format. this disables that behaviour. note that repositories should define their format version in a repo file at their root, or they'll be assumed to be in the older format. and fr fr, it's preferable in any case to upgrade the repositories manually using opam admin upgrade [--mirror URL] when possible. 🧚
  • -q, --quiet β€” disables --verbose. shhh. 🀫
  • --root=ROOT β€” use ROOT as the current root path. this is equivalent to setting $OPAMROOT to ROOT. 🌳
  • --safe, --readonly β€” make sure nothing gets automatically updated or rewritten. super useful for calling from completion scripts, for example. it will fail whenever such an operation is needed; it also avoids waiting for locks, skips interactive questions and overrides the $OPAMDEBUG variable. this is equivalent to setting the environment variable $OPAMSAFE. πŸ›‘οΈ
  • --solver=CMD β€” specify the CUDF solver to use for resolving package installation problems. this is either a predefined solver (this version of opam supports builtin-mccs+lp(), builtin-mccs+glpk, builtin-dummy-z3-solver, builtin-0install, aspcud, mccs, aspcud-old, packup), or a custom command that should contain the variables %{input}%, %{output}%, %{criteria}%, and optionally %{timeout}%. this is equivalent to setting $OPAMEXTERNALSOLVER. βš™οΈ
  • --strict β€” fail whenever an error is found in a package definition or a configuration file. the default is to continue silently if possible. no more playing nice. πŸ”₯
  • --switch=SWITCH β€” use SWITCH as the current compiler switch. this is equivalent to setting $OPAMSWITCH to SWITCH. πŸ”€
  • --use-internal-solver β€” disable any external solver and use the built-in one (this requires that opam has been compiled with a built-in solver). this is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER. 🏠
  • -v, --verbose β€” be more verbose. one -v shows all package commands, repeat to also display commands called internally (e.g. tar, curl, patch etc.). repeating n times is equivalent to setting $OPAMVERBOSE to "n". πŸ—£οΈ
  • --version β€” show version information. that's it, that's the whole thing. ⭐
  • -w, --working-dir β€” whenever updating packages that are bound to a local, version-controlled directory, update to the current working state of their source instead of the last committed state, or the ref they're pointing to. since the source directory is copied as it is, if it isn't clean it may result in an opam build failure 😭. this only affects packages explicitly listed on the command-line. it can also be set with $OPAMWORKINGDIR. πŸ—‚οΈ
  • -y, --yes β€” answer yes to all opam yes/no questions without prompting. see also --confirm-level. this is equivalent to setting $OPAMYES to "true". βœ…

🌱 ENVIRONMENT 🌱

So like, opam is constantly reading your vibe from the environment πŸ’… and here's the whole list of env vars she's checking. Pro tip bestie: boolean vars want "0", "no", "false" or literally just the empty string to mean off, and "1", "yes" or "true" to mean on ✨

  • OPAMALLPARENS β€” wraps ALL the filters up in parenthesis, cute and contained πŸŽ€
  • OPAMASSUMEDEPEXTS β€” check out the --assume-depexts option, bestie.
  • OPAMAUTOANSWER β€” internal use only, not for us πŸ™ˆ
  • OPAMAUTOREMOVE β€” see the remove option --auto-remove.
  • OPAMBESTEFFORT β€” see option `--best-effort'.
  • OPAMBESTEFFORTPREFIXCRITERIA β€” sets the string that must be prepended to the criteria when the --best-effort option is set, and it's expected to maximise the opam-query property in the solution. maximizing, slay ✨
  • OPAMBUILDDOC β€” Removed in 2.1. rip bozo πŸ’€
  • OPAMBUILDTEST β€” Removed in 2.1. also gone 😭
  • OPAMCLI β€” see option `--cli'.
  • OPAMCOLOR β€” when set to always or never, sets a default value for the --color option. 🌈
  • OPAMCONFIRMLEVEL β€” see option --confirm-level. heads up: OPAMCONFIRMLEVEL has priority over OPAMYES and OPAMNO πŸ‘‘
  • OPAMCRITERIA β€” specifies user preferences for dependency solving. the default value depends on the solver version, so use config report to find out the current setting. see also option --criteria.
  • OPAMCUDFFILE β€” save the cudf graph to file-actions-explicit.dot.
  • OPAMCUDFTRIM β€” controls the filtering of unrelated packages during CUDF preprocessing.
  • OPAMCURL β€” can be used to select a given 'curl' program. see OPAMFETCH for more options.
  • OPAMDEBUG β€” see options --debug and --debug-level.
  • OPAMDEBUGSECTIONS β€” if set, limits debug messages to the space-separated list of sections. sections can optionally have a specific debug level (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use --debug-level.
  • OPAMDIGDEPTH β€” defines how aggressive the lookup for conflicts during CUDF preprocessing is. πŸ‘€
  • OPAMDOWNLOADJOBS β€” sets the maximum number of simultaneous downloads. parallel queen πŸ‘‘
  • OPAMDROPWORKINGDIR β€” overrides packages previously updated with --working-dir on update. without this variable set, opam would keep them unchanged unless explicitly named on the command-line.
  • OPAMDRYRUN β€” see option --dry-run.
  • OPAMEDITOR β€” sets the editor to use for opam file editing, and it overrides $EDITOR and $VISUAL. main character energy πŸ’…
  • OPAMERRLOGLEN β€” sets the number of log lines printed when a sub-process fails. 0 prints all of them.
  • OPAMEXTERNALSOLVER β€” see option `--solver'.
  • OPAMFAKE β€” see option `--fake'.
  • OPAMFETCH β€” specifies how to download files: either wget, curl or a custom command where variables %{url}%, %{out}%, %{retry}%, %{compress}% and %{checksum}% will be replaced. overrides the 'download-command' value from the main config file.
  • OPAMFIXUPCRITERIA β€” same as OPAMUPGRADECRITERIA, but specific to fixup and reinstall.
  • OPAMIGNOREAVAILABLE β€” see install option `--ignore-available-on'.
  • OPAMIGNORECONSTRAINTS β€” see install option `--ignore-constraints-on'.
  • OPAMIGNOREPINDEPENDS β€” see option `--ignore-pin-depends'.
  • OPAMINPLACEBUILD β€” see option `--inplace-build'.
  • OPAMJOBS β€” sets the maximum number of parallel workers to run.
  • OPAMJSON β€” log json output to the given file (use character % to index the files).
  • OPAMKEEPBUILDDIR β€” see install option `--keep-build-dir'.
  • OPAMKEEPLOGS β€” tells opam to not remove some temporary command logs and some backups. this skips some finalisers and may also help to get more reliable backtraces. lowkey useful for debugging ✨
  • OPAMLOCKED β€” a combination of the --locked and --lock-suffix options.
  • OPAMLOGS β€” logdir sets log directory, default is a temporary directory in /tmp.
  • OPAMMAKECMD β€” set the system make command to use.
  • OPAMMERGEOUT β€” merge process outputs, stderr on stdout. girlies merging 🫢
  • OPAMNO β€” answer no to any question asked, see options --no and --confirm-level. OPAMNO is ignored if either OPAMCONFIRMLEVEL or OPAMYES is set.
  • OPAMNOAGGREGATE β€” with opam admin check, don't aggregate packages.
  • OPAMNOASPCUD β€” Deprecated. πŸ’€
  • OPAMNOAUTOUPGRADE β€” disables automatic internal upgrade of repositories in an earlier format to the current one, on 'update' or 'init'.
  • OPAMNOCHECKSUMS β€” enables option --no-checksums when available.
  • OPAMNODEPEXTS β€” disables system dependencies handling, see option `--no-depexts'.
  • OPAMNOENVNOTICE β€” Internal.
  • OPAMNOSELFUPGRADE β€” see option --no-self-upgrade
  • OPAMPINKINDAUTO β€” sets whether version control systems should be detected when pinning to a local path. Enabled by default since 1.3.0.
  • OPAMPRECISETRACKING β€” fine grain tracking of directories.
  • OPAMPREPRO β€” set this to false to disable CUDF preprocessing. Less efficient, but might help debugging solver issue.
  • OPAMREPOSITORYTARRING β€” internally store all non-vcs repositories as tar.gz files (by default, http repositories are stored as archive). this can be much faster on filesystems that don't cope well with scanning large trees. all operation are done in-memory, no I/O for scanning the repository. in-memory?? so efficient of her 🌸
  • OPAMREQUIRECHECKSUMS β€” Enables option --require-checksums when available (e.g. for opam install).
  • OPAMRETRIES β€” sets the number of tries before failing downloads.
  • OPAMREUSEBUILDDIR β€” see option `--reuse-build-dir'.
  • OPAMROOT β€” see option --root'. this is automatically set by opam env --root=DIR --set-root`.
  • OPAMROOTISOK β€” don't complain when running as root. πŸ‘‘
  • OPAMSAFE β€” see option `--safe'.
  • OPAMSHOW β€” see option `--show'.
  • OPAMSKIPUPDATE β€” see option `--skip-updates'.
  • OPAMSKIPVERSIONCHECKS β€” bypasses some version checks. Unsafe, for compatibility testing only. ⚠️ like bestie, don't.
  • OPAMSOLVERALLOWSUBOPTIMAL β€” (default true) allows some solvers to still return a solution when they reach timeout; while the solution remains assured to be consistent, there is no guarantee in this case that it fits the expected optimisation criteria. if true, opam willcontinue with a warning, if false a timeout is an error. currently only the builtin-z3 backend handles this degraded case.
  • OPAMSOLVERTIMEOUT β€” change the time allowance of the solver. default is 60.0, set to 0 for unlimited. note that all solvers may not support this option.
  • OPAMSOLVERTOLERANCE β€” changes the tolerance towards the solver choosing an unoptimized solution (i.e. might pull outdated packages). typical values range from 0.0 (best solution known to the solver) to 1.0 (unoptimized solution). default is 0.0. this option is useful in case the solver can't find a solution in a reasonable time (see $OPAMSOLVERTIMEOUT). note that all solvers may not support this option.
  • OPAMSTATS β€” Removed in 2.4.
  • OPAMSTATUSLINE β€” display a dynamic status line showing what's currently going on on the terminal. (one of one of always, never or auto)
  • OPAMSTRICT β€” fail on inconsistencies (file reading, switch import, etc.). no chill mode, periodt.
  • OPAMSWITCH β€” see option --switch'. automatically set by opam env --switch=SWITCH --set-switch`.
  • OPAMUNLOCKBASE β€” see install option `--unlock-base'.
  • OPAMUPGRADECRITERIA β€” specifies user preferences for dependency solving when performing an upgrade. overrides OPAMCRITERIA in upgrades if both are set. see also option --criteria.
  • OPAMUSEINTERNALSOLVER β€” see option `--use-internal-solver'.
  • OPAMUSEOPENSSL β€” Removed in 2.2.
  • OPAMUTF8 β€” use UTF8 characters in output (one of one of always, never or auto). by default auto, which is determined from the locale).
  • OPAMUTF8MSGS β€” use extended UTF8 characters (camels) in opam messages. implies OPAMUTF8. this is set by default on macOS only. camels bestie πŸͺ
  • OPAMVALIDATIONHOOK β€” if set, uses the %{hook}% command to validate an opam repository update.
  • OPAMVERBOSE β€” see option `--verbose'.
  • OPAMVERBOSEON β€” see option --verbose-on
  • OPAMVERSIONLAGPOWER β€” do not use. that's it. don't. πŸ™ˆ
  • OPAMWITHDEVSETUP β€” see install option `--with-dev-setup'.
  • OPAMWITHDOC β€” see install option `--with-doc'.
  • OPAMWITHTEST β€” see install option --with-test.
  • OPAMWORKINGDIR β€” see option `--working-dir'.
  • OPAMYES β€” see options --yes and --confirm-level. OPAMYES has priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set. yes queen πŸ‘‘
  • OPAMVAR_var β€” overrides the contents of the variable _var_ when substituting %{var}% strings in opam files.
  • OPAMVAR_package_var β€” overrides the contents of the variable _package:var_ when substituting %{package:var}% strings in opam files.

πŸ¦‹ CLI VERSION πŸ¦‹

Okay so listen. all scripts and programmatic invocations of opam should use --cli in order to ensure that they work seamlessly with future versions of the opam client. ngl it's giving future-proof. additionally, blog posts or other documentation can benefit, as it prevents information from becoming stale. ✨

although opam only supports roots (~/.opam/) for the current version, it does provide backwards compatibility for its command-line interface.

since CLI version support was only added in opam 2.1, use OPAMCLI to select 2.0 support (as opam 2.0 will just ignore it), and --cli=2.1 for 2.1 (or later) versions, since an environment variable controlling the parsing of syntax is brittle. to this end, opam displays a warning if OPAMCLI specifies a valid version other than 2.0, and also if --cli=2.0 is specified. πŸ‘€

the command-line version is selected by using the --cli option or the OPAMCLI environment variable. --cli may be specified morethan once, where the last instance takes precedence. OPAMCLI is only inspected if --cli is not given.

✨ EXIT STATUS ✨

okay bestie, before we get into the codes β€” there's a little exception to literally everything below. The exec command? It doesn't play by these rules πŸ’…. Instead it returns 127 if the command wasn't found or couldn't be executed, and otherwise it returns the command's own exit value. So if you're reading this list like "wait, why did exec do that", that's why. Slay.

  • 0 β€” Success! Or true, if we're talking boolean queries. The good ending πŸŽ€
  • 1 β€” False. This one shows up when a boolean return value is what's expected, like when you run with --check, or for queries such as opam lint. Not an error, just a "no" ✨
  • 2 β€” Bad command-line arguments, or arguments pointing at an invalid context (think: a file that doesn't follow the expected format). The vibes were off 🫠
  • 5 β€” Not found. You asked for something (a package, a version, a repository, etc.) and it genuinely couldn't be found. Bestie, it's not there 😭
  • 10 β€” Aborted. The operation wanted confirmation and... didn't get it. Consent matters πŸ™ˆ
  • 15 β€” Could not acquire the locks required for the operation. The lock was held and she was left on read πŸ”’
  • 20 β€” There is no solution to the user request. This can happen when you ask to install two incompatible packages, for example. Math said no πŸ’€
  • 30 β€” Error in package definition, or other metadata files. Heads up: using --strict raises this error more often. So strict mode is strict. Shocking πŸŽ€
  • 31 β€” Package script error. Some package operations were unsuccessful. This may be an error in the packages, or an incompatibility with your system. And note β€” this can be a partial error 🌸
  • 40 β€” Sync error. Some remotes just couldn't be fetched from the network. Also can be a partial error 🌈
  • 50 β€” Configuration error. Opam or your system configuration doesn't allow the operation, and it needs fixing. Fix it bestie πŸ’…
  • 60 β€” Solver failure. The solver failed to return a sound answer. Could be a broken external solver, or an error in solver configuration. The solver is not okay rn 😭
  • 99 β€” Internal error. Something went wrong, likely due to a bug in opam itself. Not you. It's opam πŸ’€
  • 130 β€” User interrupt. SIGINT was received, generally because the user pressed Ctrl+C. You did that 🫢

and then there's this little trio, sitting here all on its own:

  • 0 β€” on success.
  • 123 β€” on indiscriminate errors reported on standard error.
  • 124 β€” on command line parsing errors.
  • 125 β€” on unexpected internal errors (bugs).

πŸ“š FURTHER DOCUMENTATION πŸ“š

See https://opam.ocaml.org/doc. That's the spot for more reading, bestie πŸ“–βœ¨


πŸ‘‘ AUTHORS πŸ‘‘

the icons who made this happen, fr fr πŸ’–

  • David Allsopp <david@tarides.com>
  • Vincent Bernardoff <vb@luminar.eu.org>
  • Raja Boujbel <raja.boujbel@ocamlpro.com>
  • Kate Deplaix <kit-ty-kate@exn.st>
  • Roberto Di Cosmo <roberto@dicosmo.org>
  • Thomas Gazagnaire <thomas@gazagnaire.org>
  • Louis Gesbert <louis.gesbert@ocamlpro.com>
  • Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
  • Anil Madhavapeddy <anil@recoil.org>
  • Guillem Rieu <guillem.rieu@ocamlpro.com>
  • Ralf Treinen <ralf.treinen@pps.jussieu.fr>
  • Frederic Tuong <tuong@users.gforge.inria.fr>

πŸ¦‹ SEE ALSO πŸ¦‹

  • opam admin(1)

(go read that one too, it's giving main character energy πŸ”₯)


πŸ› BUGS πŸ›

Check bug reports at https://github.com/ocaml/opam/issues. If something's broken, that's where the receipts live 🫢


and that's a wrap on OPAM ADMIN-MAKE(1), from Opam admin 2.6.1 πŸ’œ thanks for reading all the way to the bottom bestie, you're literally the moment, no cap βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from