Excerpts from Frederick Zhang's message of May 4, 2020 20:11:
Patch by Johannes Löthberg [1] with minor modifications
[1] https://lists.archlinux.org/pipermail/pacman-dev/2016-February/020922.html
Signed-off-by: Frederick Zhang <frederick888@tsundere.moe> ---
It probably got lost and was never merged according to the discussion I just had with Eli in pacman-dev.
Credits to Johannes. I made a few minor changes to make it compile.
Hey, Sorry for the late reply, been too busy... The reason that it was never merged is that it doesn't work properly. The problem is that while it works fine for -so, when searching for local packages it should properly exclude optional dependencies that are not installed so they're not printed, rather than being printed as unresolvable. -- Sincerely, Johannes Löthberg :: SA0DEM