| git.druid.rocks | index | druid520 | mp | docs/ | reference/ | commands/ | rescue.btft |
docs/reference/commands/rescue.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 rescue[e]
[h2]synopsis[e]
[code]
mp rescue
[e]
[h2]description[e]
emergency recovery, for one specific disaster: a USE-flag override that's gated [code]install[e]/[code]update[e]/[code]use[e]/[code]reinstall[e] (or [code]commands[e] itself) out of existence for mp's own [code]meta/mp[e] package, leaving no other [code]mp.<command>[e] left to fix it with. rebuilds mp from source and reinstalls EVERY [code]mp.<command>[e] and every [code]mplib::*[e] module, unconditionally -- no USE-flag gating at all, since the whole point is recovering from having gated one of them out of existence in the first place.
lives directly in [code]mp.pl[e] itself (dispatched exactly like [code]help[e], never as a separate [code]mp.<command>[e] file) and deliberately avoids every [code]mplib::*[e] module, with its own minimal, ad hoc [code]/etc/mp.conf[e] key lookup instead of real config parsing -- it has to keep working even if mplib itself were somehow missing or broken. the git URL it clones from isn't hardcoded a second time here either: it's read straight out of [code]meta/mp[e]'s own [code]add.sh[e]/[code]pkg.conf[e] in the ports tree, the one real source of truth for where mp's source comes from.
after reinstalling everything, it also clears mp's own [code]USE=[e] override in [code]WD/pkgconf.conf[e] -- the other half of really being unstuck, since leaving a broken [code]-commands[e]/[code]-install[e] override in place would just have the very next ordinary reinstall/update strip everything back out again.
[h2]examples[e]
[code]
mp use mp -install -commands # (hypothetically) locks yourself out
mp install figlet
err: bad usage.
mp rescue
rescue: cloning git://git.druid.rocks/druid520/mp.git ...
rescue: building ...
rescue: reinstalling every command and extension, unconditionally ...
rescue: cleared mp's own USE= override in /usr/mp/pkgconf.conf.
rescue: done -- every core command and extension reinstalled, USE-flag state reset to defaults.
[e]
[h2]see also[e]
[see name="reference/commands/use"]use[e], [see name="reference/extensions"]reference/extensions[e].