Pseudo-Portname Selectors
Joshua Root
jmr at macports.org
Wed Sep 11 06:16:37 UTC 2024
> When I run
>
> port echo depends:vim
>
> neovim-qt
> p5-text-vimcolor
> py-neovim
> rails.vim
> libvmaf
> gutils-suite-core
> mpvim
> neovim-remote
> nvimpager
> vim2html
> vimpager
> dosfstools
>
> (12 ports are listed)
>
> But when I run
>
> port echo rdepends:vim
>
> dosfstools
> gutils-suite
> gutils-suite-core
> gutils-suite-extra
> libvmaf
> mpvim
> rails.vim
> vim2html
> vimpager
>
> (9 ports are listed)
Another subtle semantic difference. The selectors that match against the
PortIndex do so as a regex. But for rdepends:, there isn't really any
sensible way to apply the same regex recursively, since the string you
want to match changes with each level of recursion. So it just does
exact string matching on the portname component of each depspec.
Due to depends: taking a regex that is matched on the raw PortIndex
fields, the way to get all ports that directly depend on vim is actually:
port echo 'depends::vim(\s|$)'
because the regex "vim" will match other ports like neovim and vimpager.
- Josh
More information about the macports-users
mailing list