./xbps-src show-build-deps: include checkdepends when using -Q or -K
Due to this change, `./xbps-src sort-dependencies` will take checkdepends into account when using -Q or -K. Before this commit, if `pkgA` checkdepends on `pkgB`, sort-dependencies could still print `pkgA` before `pkgB`. This causes CI to build `pkgB` twice: first when building `pkgA`, which forces implicit build of pkgB; second when building `pkgB` (explicit, so it will ignore the package is already built). The implementation uses `skip_check_step()` from previous commit, for consistency, so checkdepends are only taken into account if the check step would be enabled. In particular, nothing is changed unless -Q or -K flag is passed. EXAMPLE: Before: ``` $ ./xbps-src -Q sort-dependencies python3-process-tests python3-pytest-cov python3-pytest-cov python3-process-tests ``` After: ``` $ ./xbps-src -Q sort-dependencies python3-process-tests python3-pytest-cov python3-process-tests python3-pytest-cov ```
This commit is contained in:
parent
ebe26129ef
commit
7bd875c33f
|
@ -116,7 +116,9 @@ show_pkg_build_depends() {
|
||||||
}
|
}
|
||||||
|
|
||||||
show_pkg_build_deps() {
|
show_pkg_build_deps() {
|
||||||
show_pkg_build_depends "${makedepends} $(setup_pkg_depends '' 1 1)" "${hostmakedepends}"
|
local build_depends="${makedepends} $(setup_pkg_depends '' 1 1)"
|
||||||
|
skip_check_step || build_depends+=" ${checkdepends}"
|
||||||
|
show_pkg_build_depends "${build_depends}" "${hostmakedepends}"
|
||||||
}
|
}
|
||||||
|
|
||||||
show_pkg_hostmakedepends() {
|
show_pkg_hostmakedepends() {
|
||||||
|
@ -127,6 +129,10 @@ show_pkg_makedepends() {
|
||||||
show_pkg_build_depends "${makedepends}" ""
|
show_pkg_build_depends "${makedepends}" ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
show_pkg_checkdepends() {
|
||||||
|
show_pkg_build_depends "${checkdepends}" ""
|
||||||
|
}
|
||||||
|
|
||||||
show_pkg_build_options() {
|
show_pkg_build_options() {
|
||||||
local f
|
local f
|
||||||
|
|
||||||
|
|
7
xbps-src
7
xbps-src
|
@ -101,6 +101,9 @@ show-avail <pkgname>
|
||||||
show-build-deps <pkgname>
|
show-build-deps <pkgname>
|
||||||
Show required build dependencies for <pkgname>.
|
Show required build dependencies for <pkgname>.
|
||||||
|
|
||||||
|
show-check-deps <pkgname>
|
||||||
|
Show required check dependencies for <pkgname>.
|
||||||
|
|
||||||
show-deps <pkgname>
|
show-deps <pkgname>
|
||||||
Show required run-time dependencies for <pkgname>. Package must be
|
Show required run-time dependencies for <pkgname>. Package must be
|
||||||
installed into destdir.
|
installed into destdir.
|
||||||
|
@ -904,6 +907,10 @@ case "$XBPS_TARGET" in
|
||||||
read_pkg ignore-problems
|
read_pkg ignore-problems
|
||||||
show_pkg_makedepends
|
show_pkg_makedepends
|
||||||
;;
|
;;
|
||||||
|
show-checkdepends)
|
||||||
|
read_pkg ignore-problems
|
||||||
|
show_pkg_checkdepends
|
||||||
|
;;
|
||||||
show-pkg-var-dump)
|
show-pkg-var-dump)
|
||||||
read_pkg ignore-problems
|
read_pkg ignore-problems
|
||||||
for sub_name in $subpackages; do
|
for sub_name in $subpackages; do
|
||||||
|
|
Loading…
Reference in New Issue