diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh index 33ab46e8a97..ee89c83f997 100644 --- a/common/xbps-src/shutils/show.sh +++ b/common/xbps-src/shutils/show.sh @@ -47,10 +47,13 @@ show_pkg_files() { [ -d ${PKGDESTDIR} ] && find ${PKGDESTDIR} -print } +show_avail() { + check_pkg_arch "$XBPS_CROSS_BUILD" 2>/dev/null +} + show_pkg_build_deps() { local f x _pkgname _dep found result - check_pkg_arch "$XBPS_CROSS_BUILD" setup_pkg_depends result=$(mktemp || exit 1) diff --git a/xbps-src b/xbps-src index f47ae88cddc..f66634ea232 100755 --- a/xbps-src +++ b/xbps-src @@ -61,6 +61,10 @@ remove-autodeps show Show information for the specified package. +show-avail + Returns 0 if package can be built for the given architecture, + any other error otherwise. + show-build-deps Show required build dependencies for . @@ -637,6 +641,10 @@ case "$XBPS_TARGET" in read_pkg show_pkg ;; + show-avail) + read_pkg + show_avail + ;; show-files) read_pkg show_pkg_files