mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
makepkg: do not allow badly formatted arch lines
It appears there are a lot of packages with arch=('i686 x86_64') floating around. Quote the arch array when passing as a parameter to detect such things. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
6405ecb259
commit
b82a0d83ce
@ -2136,7 +2136,7 @@ check_sanity() {
|
|||||||
done || ret=1
|
done || ret=1
|
||||||
|
|
||||||
if [[ $arch != 'any' ]]; then
|
if [[ $arch != 'any' ]]; then
|
||||||
if ! in_array $CARCH ${arch[@]}; then
|
if ! in_array $CARCH "${arch[@]}"; then
|
||||||
if (( ! IGNOREARCH )); then
|
if (( ! IGNOREARCH )); then
|
||||||
error "$(gettext "%s is not available for the '%s' architecture.")" "$pkgbase" "$CARCH"
|
error "$(gettext "%s is not available for the '%s' architecture.")" "$pkgbase" "$CARCH"
|
||||||
plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT"
|
plain "$(gettext "Note that many packages may need a line added to their %s")" "$BUILDSCRIPT"
|
||||||
@ -2151,7 +2151,7 @@ check_sanity() {
|
|||||||
local arch_list=""
|
local arch_list=""
|
||||||
eval $(declare -f package_${i} | sed -n 's/\(^[[:space:]]*arch=\)/arch_list=/p')
|
eval $(declare -f package_${i} | sed -n 's/\(^[[:space:]]*arch=\)/arch_list=/p')
|
||||||
if [[ ${arch_list[@]} && ${arch_list} != 'any' ]]; then
|
if [[ ${arch_list[@]} && ${arch_list} != 'any' ]]; then
|
||||||
if ! in_array $CARCH ${arch_list[@]}; then
|
if ! in_array $CARCH "${arch_list[@]}"; then
|
||||||
if (( ! IGNOREARCH )); then
|
if (( ! IGNOREARCH )); then
|
||||||
error "$(gettext "%s is not available for the '%s' architecture.")" "$i" "$CARCH"
|
error "$(gettext "%s is not available for the '%s' architecture.")" "$i" "$CARCH"
|
||||||
ret=1
|
ret=1
|
||||||
|
Loading…
Reference in New Issue
Block a user