do not edit — generated by btf.
git.druid.rocksindexdruid520mpdocs/reference/commands/install.btft

docs/reference/commands/install.btft


[table class="topnav"]
[tr]
[td class="logotab"]mp[e]
[td][see name="index"]index[e][e]
[td][see name="guide/index"]guide[e][e]
[td][see name="reference/index"]reference[e][e]
[e]
[e]
 
[h1]mp install[e]
 
[h2]synopsis[e]
 
[code]
mp install [--force] [--no-deps] [--unmask] [--sysroot=<name>] <pkg|world|all|@set> ...
[e]
 
[h2]description[e]
 
resolves and installs one or more packages, in dependency order. every argument goes through the same expansion every mp <command> taking package names does: [code]world[e] means every currently-installed package, [code]all[e] every port in every configured repo, [code]@name[e] the contents of [code]WD/sets/name.set[e] (see [see name="reference/commands/export"]export[e]), and a bare [code]%tag[e] a soft request for whichever provider resolution picks.
 
unless [code]--no-deps[e] is given, the whole batch is validated up front by mp's planner ([code]plan_resolution[e]) before anything is actually built: every %tag dependency across every requested package is resolved together, backtracking past a candidate that would conflict with another to the next-lowest-pkg_pref one, so a request that can't be satisfied fails immediately with a reason instead of partway through, with some of the batch already installed. a request the planner declines to judge (a per-package [code]SYSROOT=[e] override it doesn't model, for instance) falls through to the normal per-package resolution [code]install_pkg[e] does on its own -- same end result, just not pre-validated.
 
while the planner runs, a rotating spinner ("resolving dependencies... /") prints to a real terminal (suppressed entirely when stdout/stderr isn't one, so it never floods a log file).
 
each package installed this way is marked "requested" in the db -- the same flag [see name="reference/commands/prune"]prune[e] reads to decide what's safe to remove later, and [code]mp list --installed[e] prints. installing an already-installed dependency by name promotes it to requested, so prune leaves it alone from then on.
 
[h2]options[e]
 
[code]--force[e], [code]--no-deps[e], [code]--unmask[e], [code]--config=<file>[e], [code]--sysroot=<name>[e] -- see [see name="reference/config"]reference/config[e].
 
[h2]examples[e]
 
[code]
mp install figlet                  # resolve and install
mp install --sysroot=arm64 figlet  # into a named sysroot instead of the live root
mp install @myset                  # every package in a previously exported set
mp install world                   # reinstall everything currently installed (rare; see update)
[e]
 
[quote class="note"]
note: [code]mp install world[e] is almost never what you want for keeping an existing system current -- that's [see name="reference/commands/update"]mp update world[e], which rebuilds in dependency order and supports --resume. install's own dependency-edge ordering only exists inside plan_resolution's up-front validation pass, not across the whole batch at build time.
[e]
 
[h2]see also[e]
 
[see name="reference/commands/reinstall"]reinstall[e], [see name="reference/commands/update"]update[e], [see name="reference/commands/dryrun"]dryrun[e], [see name="reference/commands/remove"]remove[e], [see name="reference/commands/export"]export[e], [see name="reference/commands/providers"]providers[e].
powered by btf.