From d07d3a72c91bf932420d1be85492398a12db733b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 16 Apr 2015 08:38:32 +0200 Subject: [PATCH] xbps-src: new target: show-avail and returns 0 if pkg can be built. --- common/xbps-src/shutils/show.sh | 5 ++++- xbps-src | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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