diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh index ebf5a0bc131..d60ee556de2 100644 --- a/common/xbps-src/shutils/build_dependencies.sh +++ b/common/xbps-src/shutils/build_dependencies.sh @@ -32,19 +32,18 @@ setup_pkg_depends() { if [ -z "$foo" ]; then msg_error "$pkgver: failed to resolve virtual dependency for '$j' (missing from etc/virtual)\n" fi - _deps+="$foo " + [[ $out ]] && echo "$foo" else foo="$($XBPS_UHELPER_CMD getpkgdepname ${_depname} 2>/dev/null)" if [ -z "$foo" ]; then foo="$($XBPS_UHELPER_CMD getpkgname ${_depname} 2>/dev/null)" [ -z "$foo" ] && foo="${_depname}" fi - _deps+="$foo " + [[ $out ]] && echo "$foo" fi run_depends+="${_depname} " done - [[ $out && $_deps ]] && echo "$_deps" return 0 } diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh index 6c6f03ff726..314dc5aeabe 100644 --- a/common/xbps-src/shutils/pkgtarget.sh +++ b/common/xbps-src/shutils/pkgtarget.sh @@ -21,7 +21,7 @@ check_pkg_arch() { esac done if [ -z "$nonegation" -a -n "$match" ] || [ -n "$nonegation" -a -z "$match" ]; then - msg_red "$pkgname: this package cannot be built for ${_arch}.\n" + msg_red "${pkgname}-${version}_${revision}: this package cannot be built for ${_arch}.\n" exit 2 fi fi diff --git a/xbps-src b/xbps-src index a488ed3f849..e2ecbf36e4f 100755 --- a/xbps-src +++ b/xbps-src @@ -891,33 +891,28 @@ case "$XBPS_TARGET" in ;; dbulk-dump) read_pkg + check_pkg_arch "$XBPS_CROSS_BUILD" for x in pkgname version revision; do printf '%s: %s\n' "$x" "${!x}" done for x in bootstrap; do [[ ${!x} ]] && printf '%s: %s\n' "$x" "${!x}" done - for x in hostmakedepends makedepends depends; do + for x in hostmakedepends makedepends; do arr=(${!x}) if [[ ${#arr} -gt 0 ]]; then printf '%s:\n' "$x" printf ' %s\n' "${arr[@]}" fi done + _cleandeps=$(setup_pkg_depends "" 1 1 | { grep -vF "$(printf "%s\n" $pkgname $subpackages)" || :; } | sort -u) || exit 1 + if [[ $_cleandeps ]]; then + printf 'depends:\n' + printf ' %s\n' $_cleandeps + fi if [[ $subpackages ]]; then printf 'subpackages:\n' - for x in ${subpackages}; do - . ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh - ${x}_package - printf ' %s\n' "$x" - for x in depends; do - arr=(${!x}) - if [[ ${#arr} -gt 0 ]]; then - printf ' %s:\n' "$x" - printf ' %s\n' "${arr[@]}" - fi - done - done + printf ' %s\n' $subpackages fi ;; show-options)