From 4bbf81d2b865ad7b1c1cf4959128b0af8f443c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 23 Dec 2023 19:40:53 -0300 Subject: [PATCH] have show-build-deps include checkdepends when using -Q or -K This makes sort-dependencies take checkdepends into account when using -Q or -K. As it is now, if pkgA checkdepends on pkgB, sort-dependencies will still print pkgA before pkgB. This causes CI to build pkgB twice: first build pkgA which forces implicit build of pkgB; then build of pkgB (explicit, so it will ignore the package is already built). A concrete example: $ ./xbps-src sort-dependencies python3-process-tests python3-pytest-cov python3-pytest-cov python3-process-tests After this commit: $ ./xbps-src -Q sort-dependencies python3-process-tests python3-pytest-cov python3-process-tests python3-pytest-cov Note that nothing is changed unless -Q or -K flag is passed. --- common/xbps-src/shutils/show.sh | 4 ++++ xbps-src | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh index 606396d2b4b1a..8af32295d25d5 100644 --- a/common/xbps-src/shutils/show.sh +++ b/common/xbps-src/shutils/show.sh @@ -120,6 +120,10 @@ show_pkg_build_deps() { show_pkg_build_depends "${makedepends} $(setup_pkg_depends '' 1 1)" "${hostmakedepends}" } +show_pkg_check_deps() { + show_pkg_build_depends "${checkdepends}" "" +} + show_pkg_hostmakedepends() { show_pkg_build_depends "" "${hostmakedepends}" } diff --git a/xbps-src b/xbps-src index cdb5f8c6d643e..f4afdd13f5f70 100755 --- a/xbps-src +++ b/xbps-src @@ -91,6 +91,9 @@ show-avail show-build-deps Show required build dependencies for . +show-check-deps + Show required check dependencies for . + show-deps Show required run-time dependencies for . Package must be installed into destdir. @@ -860,6 +863,11 @@ case "$XBPS_TARGET" in show-build-deps) read_pkg ignore-problems show_pkg_build_deps + [ -n "$XBPS_CHECK_PKGS" ] && show_pkg_check_deps + ;; + show-check-deps) + read_pkg ignore-problems + show_pkg_check_deps ;; show-hostmakedepends) read_pkg ignore-problems