build_library/board_options: Fix pkg_version function

The documentation says it always returns zero, which is not true -
portageq could return a non-zero return value and that would be the
return value of the function. Fix the function to actually follow the
documentation - apparently the function should just return an empty
string in case of failure (like package not found).
This commit is contained in:
Krzesimir Nowak 2021-09-28 16:31:46 +02:00
parent b797cdb723
commit d801ecccdf

View File

@ -29,7 +29,7 @@ pkg_use_enabled() {
# Prints: some-pkg/name-1.2.3
# Note: returns 0 even if the package was not found.
pkg_version() {
portageq-"${BOARD}" best_visible "${BOARD_ROOT}" "$1" "$2"
portageq-"${BOARD}" best_visible "${BOARD_ROOT}" "$1" "$2" || :
}
# Usage: pkg_provides [installed|binary] some-pkg/name-1.2.3