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 inclusiveurls.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 minimalurls.txtfile that only includes therepofile. 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 suitableredirect: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 aurls.txtfile 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 ofaspcudormccsshould though). this is the equivalent of setting the$OPAMBESTEFFORTenvironment variable. π«Ά--cli=MAJOR.MINOR(absent=2.6) β use the command-line interface syntax and semantics ofMAJOR.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 theOPAMCLIenvironment variable to2.0instead of using this parameter. π°οΈ--color=WHENβ colorize the output.WHENhas to be one ofalways,neverorauto. that's it. serve. π--confirm-level=LEVELβ confirmation level,LEVELmust be one ofask,no,yesorunsafe-yes. can be specified more than once. if--yesor--noare also given, the value of the last--confirm-levelis taken into account. this is equivalent to setting$OPAMCONFIRMLEVEL. π--criteria=CRITERIAβ specify user preferences for dependency solving for this run. overrides$OPAMCRITERIA,$OPAMFIXUPCRITERIAand$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 toFILENAME-<n>.cudfwhere<n>is the n-th call to the solver during the opam run. π§ͺ--debugβ print debug messages to stderr. this is equivalent to setting$OPAMDEBUGto"true". πͺ²--debug-level=LEVELβ like--debug, but lets you specify the debug level (--debugsets it to1). equivalent to setting$OPAMDEBUGto 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 formatFMT. the valueFMTmust be one ofauto,pager,grofforplain. withauto, the format ispagerorplainwhenever theTERMenv var isdumbor undefined. π--ignore-pin-dependsβ ignore extra pins required by packages that get pinned, either manually throughopam pinor throughopam install DIR. this is equivalent to settingIGNOREPINDEPENDS=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$OPAMJSONvariable. π€--noβ answer no to all opam yes/no questions without prompting. see also--confirm-level. this is equivalent to setting$OPAMNOto"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 arepofile 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 usingopam admin upgrade [--mirror URL]when possible. π§-q,--quietβ disables--verbose. shhh. π€«--root=ROOTβ useROOTas the current root path. this is equivalent to setting$OPAMROOTtoROOT. π³--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$OPAMDEBUGvariable. 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 supportsbuiltin-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β useSWITCHas the current compiler switch. this is equivalent to setting$OPAMSWITCHtoSWITCH. π--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$OPAMNOASPCUDor$OPAMUSEINTERNALSOLVER. π-v,--verboseβ be more verbose. one-vshows all package commands, repeat to also display commands called internally (e.g.tar,curl,patchetc.). repeating n times is equivalent to setting$OPAMVERBOSEto"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$OPAMYESto"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-depextsoption, bestie.OPAMAUTOANSWERβ internal use only, not for us πOPAMAUTOREMOVEβ see theremoveoption--auto-remove.OPAMBESTEFFORTβ see option `--best-effort'.OPAMBESTEFFORTPREFIXCRITERIAβ sets the string that must be prepended to the criteria when the--best-effortoption is set, and it's expected to maximise theopam-queryproperty 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 toalwaysornever, sets a default value for the--coloroption. πOPAMCONFIRMLEVELβ see option--confirm-level. heads up:OPAMCONFIRMLEVELhas priority overOPAMYESandOPAMNOπOPAMCRITERIAβ specifies user preferences for dependency solving. the default value depends on the solver version, so useconfig reportto find out the current setting. see also option--criteria.OPAMCUDFFILEβ save the cudf graph tofile-actions-explicit.dot.OPAMCUDFTRIMβ controls the filtering of unrelated packages during CUDF preprocessing.OPAMCURLβ can be used to select a given'curl'program. seeOPAMFETCHfor more options.OPAMDEBUGβ see options--debugand--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:2orCLIENT 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-dironupdate. 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$EDITORand$VISUAL. main character energy πOPAMERRLOGLENβ sets the number of log lines printed when a sub-process fails.0prints all of them.OPAMEXTERNALSOLVERβ see option `--solver'.OPAMFAKEβ see option `--fake'.OPAMFETCHβ specifies how to download files: eitherwget,curlor 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 asOPAMUPGRADECRITERIA, 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--lockedand--lock-suffixoptions.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--noand--confirm-level.OPAMNOis ignored if eitherOPAMCONFIRMLEVELorOPAMYESis set.OPAMNOAGGREGATEβ withopam 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-checksumswhen available.OPAMNODEPEXTSβ disables system dependencies handling, see option `--no-depexts'.OPAMNOENVNOTICEβ Internal.OPAMNOSELFUPGRADEβ see option--no-self-upgradeOPAMPINKINDAUTOβ 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 astar.gzfiles (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-checksumswhen available (e.g. foropam install).OPAMRETRIESβ sets the number of tries before failing downloads.OPAMREUSEBUILDDIRβ see option `--reuse-build-dir'.OPAMROOTβ see option--root'. this is automatically set byopam 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β (defaulttrue) 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. iftrue, opam willcontinue with a warning, iffalsea timeout is an error. currently only thebuiltin-z3backend handles this degraded case.OPAMSOLVERTIMEOUTβ change the time allowance of the solver. default is60.0, set to0for 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 from0.0(best solution known to the solver) to1.0(unoptimized solution). default is0.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 ofalways,neverorauto)OPAMSTRICTβ fail on inconsistencies (file reading, switch import, etc.). no chill mode, periodt.OPAMSWITCHβ see option--switch'. automatically set byopam env --switch=SWITCH --set-switch`.OPAMUNLOCKBASEβ see install option `--unlock-base'.OPAMUPGRADECRITERIAβ specifies user preferences for dependency solving when performing an upgrade. overridesOPAMCRITERIAin 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 ofalways,neverorauto). by defaultauto, which is determined from the locale).OPAMUTF8MSGSβ use extended UTF8 characters (camels) in opam messages. impliesOPAMUTF8. 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-onOPAMVERSIONLAGPOWERβ 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--yesand--confirm-level.OPAMYEShas priority overOPAMNOand is ignored ifOPAMCONFIRMLEVELis set. yes queen πOPAMVAR_varβ overrides the contents of the variable _var_ when substituting%{var}%strings inopamfiles.OPAMVAR_package_varβ overrides the contents of the variable _package:var_ when substituting%{package:var}%strings inopamfiles.
π¦ 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! Ortrue, 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 asopam 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--strictraises 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.SIGINTwas 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
- arch rolling: opam 2.6.1-1 Β· LGPL-2.1-only
- fedora 44: opam 2.6.1-1.fc44 Β· LGPL-2.1-only WITH OCaml-LGPL-linking-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms