index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2011-07-22 19:47:07 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-27 12:45:12 -0500 |
commit | a7940e7419a6fb39eeafb0bfd053b90a64946d5c (patch) | |
tree | e945481830c69c6fdff0a9c5229e91147f44052d | |
parent | 819f6750047cbdb7ecb7fa4724f90e532cd73446 (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 15 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index da1cec85..0dfbc5d5 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1376,6 +1376,21 @@ check_sanity() { fi fi + if (( ${#pkgname[@]} > 1 )); then + for i in ${pkgname[@]}; do + local arch_list="" + eval $(declare -f package_${i} | sed -n 's/\(^[[:space:]]*arch=\)/arch_list=/p') + if [[ ${arch_list[@]} && ${arch_list} != 'any' ]]; then + if ! in_array $CARCH ${arch_list[@]}; then + if (( ! IGNOREARCH )); then + error "$(gettext "%s is not available for the '%s' architecture.")" "$i" "$CARCH" + ret=1 + fi + fi + fi + done + fi + local provides_list=() eval $(awk '/^[[:space:]]*provides=/,/\)/' "$BUILDFILE" | \ sed -e "s/provides=/provides_list+=/" -e "s/#.*//" -e 's/\\$//') |