xbps-src: new target: show-avail and returns 0 if pkg can be built.

This commit is contained in:
Juan RP 2015-04-16 08:38:32 +02:00
parent 6c6a6e5dad
commit d07d3a72c9
2 changed files with 12 additions and 1 deletions

View File

@ -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)

View File

@ -61,6 +61,10 @@ remove-autodeps
show <pkgname>
Show information for the specified package.
show-avail <pkgname>
Returns 0 if package can be built for the given architecture,
any other error otherwise.
show-build-deps <pkgname>
Show required build dependencies for <pkgname>.
@ -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