From 6ac848d88f4b1ff0b0468fad041b86dcc8764363 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 05 Nov 2012 18:23:31 -0500 Subject: Reduce platforms in ob_get_binary_packages(). --- diff --git a/lib/package.sh b/lib/package.sh index 72ffd63..4b5ce6a 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -131,14 +131,18 @@ ob_parse_package_metadata() ob_get_binary_packages() { - _ob_local _obgbpk_opt _obgbpk_host_arch _obgbpk_pkgs _obgbpk_pkg \ + _ob_local _obgbpk_opt _obgbpk_host_arch _obgbpk_host_plat \ + _obgbpk_pkgs _obgbpk_pkg \ _obgbpk_pkgs_clean _obgbpk_pkg_clean _obgbpk_orig_text_domain - while getopts 'a:' _obgbpk_opt; do + while getopts 'a:P:' _obgbpk_opt; do case "${_obgbpk_opt}" in a) _obgbpk_host_arch="${OPTARG}" ;; + P) + _obgbpk_host_plat="${OPTARG}" + ;; ?) _ob_return 125 return ${?} @@ -201,6 +205,11 @@ ob_get_binary_packages() "${_obgbpk_pkg}" 'Architecture')"; then continue fi + if [ -n "${_obgbpk_host_plat}" ] && ! ob_plat_is_concerned \ + "${_obgbpk_host_plat}" "$(ob_get_binary_parameter \ + "${_obgbpk_pkg}" 'Platform')"; then + continue + fi _obgbpk_pkgs="${_obgbpk_pkgs} ${_obgbpk_pkg}" done -- cgit v0.9.1