| git.druid.rocks | index | druid520 | mp | docs/ | reference/ | commands/ | use.btft |
docs/reference/commands/use.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 use[e]
[h2]synopsis[e]
[code]
mp use <pkg[:slot]> # list
mp use <pkg[:slot]> +flag -flag ... # toggle
[e]
[h2]description[e]
with no +/-flag arguments, lists every USE flag the port declares ([code]pkg_use[e]), its current effective state (marked [code]*[e] when enabled -- the same convention [see name="reference/commands/info"]info[e] prints), whether it's build-only, and what it in turn enables/depends on.
with one or more [code]+flag[e]/[code]-flag[e] arguments, toggles them relative to whatever's currently effectively enabled (already merging the mp-managed overlay, mp.conf, and the port's own default), then persists the resulting complete set under the port's bare name in [code]WD/pkgconf.conf[e]. USE is always read/written under the bare name regardless of which raw slot's [code]pkg[:slot][e] you pointed at to look up the declaration -- two raw slots of one pkg_name can declare different available flags, but the enabled SET is one shared piece of persisted state.
toggling to an empty set is handled correctly (a real "no flags enabled" override, not silently falling back to the port's own default the way an ordinary empty value would for any other config key).
[h2]examples[e]
[code]
mp use figlet
*cxx (build-only) -> libstdc++
fortran
mp use figlet -cxx
ok: figlet USE set to: fortran.
[e]
[h2]see also[e]
[see name="reference/commands/info"]info[e], [see name="reference/commands/conflicts"]conflicts[e] (identical +/- toggle convention, different key), [see name="reference/slots"]reference/slots[e] (pkg_slot_use composition).