| git.druid.rocks | index | druid520 | mp | docs/ | reference/ | commands/ | why.btft |
docs/reference/commands/why.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 why[e]
[h2]synopsis[e]
[code]
mp why <pkg>
[e]
[h2]description[e]
lists every currently-installed package that DECLARES a dependency (direct only, not transitive) resolving to the given one -- "what installed package needs this, if anything". reads each installed package's own declared/effective deps (the same [code]pkg_deps[e]/USE-conditional expansion [see name="reference/commands/tree"]tree[e] and [see name="reference/commands/update"]update[e] use) and checks whether resolving each one lands on the target's canon.
this is a declared-dependency check, not a linkage check -- a package that only ever [code]dlopen[e]s something, or links it in a way pkg_deps never declared, won't show up here even if removing the target would actually break it. see [see name="reference/commands/revdep"]revdep[e] for that instead, which reads real recorded link dependencies.
prints nothing to stdout and a note to stderr ("nothing installed depends on X") when the answer is genuinely nobody.
[h2]examples[e]
[code]
mp why libpng
figlet
[e]
[h2]see also[e]
[see name="reference/commands/revdep"]revdep[e], [see name="reference/commands/tree"]tree[e], [see name="reference/commands/prune"]prune[e] (uses the same effective-deps closure to decide what's safe to remove).