summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-05 18:20:10 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-05 18:21:11 (EST)
commit32a2c02e527b707e4279931bcc4beb1be4e35476 (patch)
tree89503284fffa6346cb0c1c70b1a20adfdeeab553
parent9584e5aff228e7ec246055dfc1a8b19714c0ea71 (diff)
Refactor ob_get_binary_packages() arch reduction.
-rw-r--r--lib/package.sh19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 3476e56..72ffd63 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -195,17 +195,14 @@ ob_get_binary_packages()
_obgbpk_pkgs=''
- if [ -n "${_obgbpk_host_arch}" ]; then
- for _obgbpk_pkg in ${_OB_BINARY_PACKAGES}; do
- if ob_arch_is_concerned "${_obgbpk_host_arch}" \
- "$(ob_get_binary_parameter \
- "${_obgbpk_pkg}" 'Architecture')"; then
- _obgbpk_pkgs="${_obgbpk_pkgs} ${_obgbpk_pkg}"
- fi
- done
- else
- _obgbpk_pkgs="${_OB_BINARY_PACKAGES}"
- fi
+ for _obgbpk_pkg in ${_OB_BINARY_PACKAGES}; do
+ if [ -n "${_obgbpk_host_arch}" ] && ! ob_arch_is_concerned \
+ "${_obgbpk_host_arch}" "$(ob_get_binary_parameter \
+ "${_obgbpk_pkg}" 'Architecture')"; then
+ continue
+ fi
+ _obgbpk_pkgs="${_obgbpk_pkgs} ${_obgbpk_pkg}"
+ done
IFS=' ' echo ${_obgbpk_pkgs}