diff --git a/xbps-src b/xbps-src index 7c3693a27da..68765b6c248 100755 --- a/xbps-src +++ b/xbps-src @@ -823,6 +823,29 @@ case "$XBPS_TARGET" in read_pkg ignore-problems show_pkg_makedepends ;; + show-pkg-var-dump) + read_pkg ignore-problems + for sub_name in $subpackages; do + if [ $sub_name = $XBPS_TARGET_PKG ]; then + ${sub_name}_package + fi + done + printf "archs: %s\n\n" "$archs" + printf "bootstrap: %s\n\n" "$bootstrap" + printf "broken: %s\n\n" "$broken" + printf "depends: %s\n\n" "$depends" + printf "hostmakedepends: %s\n\n" "$hostmakedepends" + printf "makedepends: %s\n\n" "$makedepends" + printf "nocross: %s\n\n" "$nocross" + printf "pkgname: %s\n\n" "$pkgname" + printf "restricted: %s\n\n" "$restricted" + printf "revision: %s\n\n" "$revision" + printf "subpackages: %s\n\n" "$subpackages" + printf "version: %s\n\n" "$version" + printf "provides: %s\n\n" "$provides" + printf "lib32disabled: %s\n\n" "$lib32disabled" + printf "nodebug: %s\n\n" "$nodebug" + ;; show-pkg-var) read_pkg ignore-problems for sub_name in $subpackages; do @@ -830,21 +853,29 @@ case "$XBPS_TARGET" in ${sub_name}_package fi done - printf "archs: %s\n\n" "$archs" - printf "bootstrap: %s\n\n" "$bootstrap" - printf "broken: %s\n\n" "$broken" - printf "depends: %s\n\n" "$depends" - printf "hostmakedepends: %s\n\n" "$hostmakedepends" - printf "makedepends: %s\n\n" "$makedepends" - printf "nocross: %s\n\n" "$nocross" - printf "pkgname: %s\n\n" "$pkgname" - printf "restricted: %s\n\n" "$restricted" - printf "revision: %s\n\n" "$revision" - printf "subpackages: %s\n\n" "$subpackages" - printf "version: %s\n\n" "$version" - printf "provides: %s\n\n" "$provides" - printf "lib32disabled: %s\n\n" "$lib32disabled" - printf "nodebug: %s\n\n" "$nodebug" + while IFS= read -r pkg_var; do + print_var= + case "${pkg_var}" in + archs) print_var="$archs ";; + bootstrap) print_var="$bootstrap ";; + broken) print_var="$broken ";; + depends) print_var="$depends ";; + hostmakedepends) print_var="$hostmakedepends ";; + makedepends) print_var="$makedepends ";; + nocross) print_var="$nocross ";; + pkgname) print_var="$pkgname ";; + restricted) print_var="$restricted ";; + revision) print_var="$revision ";; + subpackages) print_var="$subpackages ";; + version) print_var="$version ";; + provides) print_var="$provides ";; + lib32disabled) print_var="$lib32disabled ";; + nodebug) print_var="$nodebug ";; + esac # the space at the end of each is essential for unset vars + if [ -n "$print_var" ]; then + printf "%s\n" "$(printf "${print_var% }" | tr -t '\n\r' ' ')" + fi # The trailing space gets stripped before printing anyway + done ;; show-options) read_pkg ignore-problems