| git.druid.rocks | index | druid520 | mp | docs/ | reference/ | commands/ | owns.btft |
docs/reference/commands/owns.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/commands/index"]reference[e][e]
[e]
[e]
[h1]mp owns[e]
[h2]synopsis[e]
[code]
mp owns <path> ...
[e]
[h2]description[e]
reports which installed package's own manifest (if any) claims a given path -- or that nothing does, even though the path genuinely exists on disk (an orphan, not tracked by any manifest). a relative path resolves against the current directory, same as [code]realpath[e]/[code]readlink -f[e].
when the path is a symlink, walks the chain hop by hop rather than checking only the exact path given or only its final resolved target -- each hop gets its own ownership check, then (if that hop is itself a symlink) its own [code]->[e] line showing where it points next, continuing until a real file, a dead end, or a symlink loop. this matters because a symlink and the real file it points at are tracked independently: [code]/usr/bin/gcc -> /usr/gcc-git/bin/gcc[e] is two separate manifest entries, and either one can go missing without the other being affected -- [code]mp owns[e] surfaces exactly that, instead of silently reporting on only one end of the chain.
symlinked DIRECTORY components (not just a symlinked leaf file) resolve the same way, with their own [code]->[e] line: on a usrmerge system where [code]/bin[e] is itself a symlink to [code]usr/bin[e], [code]/bin/busybox[e] and [code]/usr/bin/busybox[e] are the same file, and [code]mp owns[e] reports that instead of wrongly treating the unresolved [code]/bin/...[e] spelling as outside the live prefix.
a path outside the live prefix ([code]INSTPREFIX[e]) is reported as such directly, rather than folded into an ambiguous "not owned".
[h2]examples[e]
[code]
mp owns /usr/bin/gcc
/usr/bin/gcc:
owned by gcc.
-> /usr/gcc-git/bin/gcc
owned by gcc.
mp owns /usr/bin/gawk
/usr/bin/gawk:
owned by gawk.
mp owns /bin/busybox
/bin/busybox:
-> /usr/bin/busybox
owned by busybox.
mp owns /tmp/some-leftover-file
/tmp/some-leftover-file:
outside /usr, no installed package could own it.
[e]
[h2]see also[e]
[see name="reference/commands/files"]files[e], [see name="reference/commands/info"]info[e], [see name="reference/commands/manifest_clean"]manifest_clean[e].