From 7f4e10ef7d07caa9fa263c0ff8ff1f8c73bb20c9 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 15 May 2014 17:46:29 -0400 Subject: ob_arch_is_concerned(): Check for arch:all. tests/ob_arch_is_concerned.sh now passes. --- (limited to 'lib') diff --git a/lib/metadata.sh b/lib/metadata.sh index ffeb9d1..86a8960 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -209,27 +209,33 @@ ob_arch_is_concerned() return 125 fi - seen_arch=1 - if [ -z "${arches}" ]; then - seen_arch=0 - fi - - for arch in ${arches}; do - not_arch="${arch#!}" - if [ "${not_arch}" != "${arch}" ]; then - if ob_match_arch "${host_arch}" "${not_arch}"; then - seen_arch=1 - break - else + if [ "x${arches}" = 'x' ]; then + return 0 + elif [ "x${host_arch}" = 'xall' ]; then + if [ "x${arches}" = 'xall' ]; then + return 0 + else + return 1 + fi + else + seen_arch=1 + for arch in ${arches}; do + not_arch="${arch#!}" + if [ "${not_arch}" != "${arch}" ]; then + if ob_match_arch "${host_arch}" "${not_arch}" + then + seen_arch=1 + break + else + seen_arch=0 + fi + elif ob_match_arch "${host_arch}" "${arch}"; then seen_arch=0 + break fi - elif ob_match_arch "${host_arch}" "${arch}"; then - seen_arch=0 - break - fi - done - - return ${seen_arch} + done + return ${seen_arch} + fi } ob_plat_is_concerned() -- cgit v0.9.1