From d801ecccdff0a1c42aaedfa44389b11ad9e56dc5 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 28 Sep 2021 16:31:46 +0200 Subject: [PATCH] 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). --- build_library/board_options.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_library/board_options.sh b/build_library/board_options.sh index e2280ccad1..c454b47bcc 100644 --- a/build_library/board_options.sh +++ b/build_library/board_options.sh @@ -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