abuild doesn't mark every executable as "provide=cmd:"
Sometimes packages provide executables outside of the standard directories, which cause apk to fail to find them. For example, apk search cmd:jar
or apk search cmd:javac
give no result, as those executables are stored in /usr/lib/jvm/java-*-openjdk/bin/
The current implementation looks only for [/usr]/[s]bin https://gitlab.alpinelinux.org/alpine/abuild/blob/master/abuild.in#L1154
Alternatively, the incriminated could symlink every executable they provide to (for example) /usr/bin, but the abuild solution has the advantage of being be exhaustive and that makes apk search
much more reliable.
one way to implement it would be: to replace change the current implementation with something like this:
IFS= for dir in $(busybox find . -type d -name bin -o -name sbin -print0); do
for i in "$dir"/*; do
…
Do you think we should we match everything in a bin or sbin directory as a provided executable?