xbps-src: fix show_pkg_build_depends after af6e1a7e79.

af6e1a7e79 introduces dependencies based in subpkgs,
but this makes "xbps-src show-build-deps" return cyclic
dependencies in some cases, i.e:

$ ./xbps-src show-build-deps kirigami2
cmake
extra-cmake-modules
kcoreaddons
kirigami2
qt5
$

This is because `kirigami2-devel` depends on `kirigami2`, thus
introducing a cycle.

Skip cycles completely, note that "show-build-deps" should not
be used to collect deps for cross compilation, because you can't
know what type of dependency it is: host or target.
This commit is contained in:
Juan RP 2020-04-15 13:12:26 +02:00
parent adf14451d4
commit a73783d17d
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ show_pkg_build_depends() {
# build time deps # build time deps
for f in ${_deps}; do for f in ${_deps}; do
# ignore dependency on itself
[[ $f == $sourcepkg ]] && continue
if [ ! -f $XBPS_SRCPKGDIR/$f/template ]; then if [ ! -f $XBPS_SRCPKGDIR/$f/template ]; then
msg_error "$pkgver: dependency '$f' does not exist!\n" msg_error "$pkgver: dependency '$f' does not exist!\n"
fi fi