From ebe26129ef73b048e77709373be4c2e8f30692f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Tue, 26 Dec 2023 12:28:39 -0300 Subject: [PATCH] common/xbps-src/shutils/build_dependencies.sh: implement skip_check_step() This function contains the logic that determines whether the check step will be skipped for the current pkg, taking into account `make_check`. Use this new function in `install_pkg_deps()` so that it uses a more accurate condition to skip installing check dependencies. For instance, check dependencies for a pkg with `make_check=extended` will no longer be installed when using `-Q`. Similar for `make_check=ci-skip`. Replaces: #46207 --- common/xbps-src/shutils/build_dependencies.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh index 57ef45a7d5d..0815e776726 100644 --- a/common/xbps-src/shutils/build_dependencies.sh +++ b/common/xbps-src/shutils/build_dependencies.sh @@ -124,6 +124,17 @@ check_installed_pkg() { return 1 } +# +# Return 0 if we will skip the check step +# +skip_check_step() { + [ -z "$XBPS_CHECK_PKGS" ] || + [ "$XBPS_CROSS_BUILD" ] || + [ "$make_check" = ci-skip -a "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ] || + [ "$make_check" = extended -a "$XBPS_CHECK_PKGS" != full ] || + [ "$make_check" = no ] +} + # # Build all dependencies required to build and run. # @@ -137,7 +148,7 @@ install_pkg_deps() { local -a host_missing_deps missing_deps missing_rdeps [ -z "$pkgname" ] && return 2 - [ -z "$XBPS_CHECK_PKGS" ] && unset checkdepends + skip_check_step && unset checkdepends if [[ $build_style ]] || [[ $build_helper ]]; then style=" with" @@ -208,7 +219,7 @@ install_pkg_deps() { # # Host check dependencies. # - if [[ ${checkdepends} ]] && [[ $XBPS_CHECK_PKGS ]] && [ -z "$XBPS_CROSS_BUILD" ]; then + if [[ ${checkdepends} ]]; then templates="" # check validity for f in ${checkdepends}; do