diff options
-rw-r--r-- | lib/metadata.sh | 44 |
1 files changed, 25 insertions, 19 deletions
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() |