dev-go/go-tools: Compile go packages selectively

This eliminates the need to use nonfatal and check for
expected binaries afterwards.

Signed-off-by: Zac Medico <zmedico@gentoo.org>
This commit is contained in:
Zac Medico
2024-08-18 17:05:13 -07:00
parent 613cdf3114
commit f52b5bc93c

View File

@@ -29,12 +29,8 @@ GO_TOOLS_BINS=(
src_compile() {
local bin packages
readarray -t packages < <(ego list ./...)
GOBIN="${S}/bin" nonfatal ego install -work "${packages[@]}" || true
for bin in "${GO_TOOLS_BINS[@]}"; do
[[ -x ${S}/bin/${bin} ]] || \
die "File not found, check build log: ${S}/bin/${bin}"
done
readarray -t packages < <(ego list ./... | grep -E "/($(echo "${GO_TOOLS_BINS[@]}" | tr ' ' '|'))$")
GOBIN="${S}/bin" ego install -work "${packages[@]}"
}
src_test() {