[pacman-dev] [PATCH 5/7] libmakepkg: disallow using any as an architecture specific variable

Allan McRae allan at archlinux.org
Tue Jun 19 13:05:02 UTC 2018


On 09/06/18 04:18, morganamilo wrote:
> Signed-off-by: morganamilo <morganamilo at gmail.com>
> ---
>  scripts/libmakepkg/lint_pkgbuild/variable.sh.in | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/libmakepkg/lint_pkgbuild/variable.sh.in b/scripts/libmakepkg/lint_pkgbuild/variable.sh.in
> index b9264768..6b7da4a2 100644
> --- a/scripts/libmakepkg/lint_pkgbuild/variable.sh.in
> +++ b/scripts/libmakepkg/lint_pkgbuild/variable.sh.in
> @@ -57,12 +57,15 @@ lint_variable() {
>  	done
>  
>  	for a in ${arch[@]}; do
> -		[[ $a == "any" ]] && continue
> -
>  		for i in ${arch_array[@]}; do
>  			v="${i}_${a}"
>  			eval "keys=(\"\${!${v}[@]}\")"
>  			if (( ${#keys[*]} > 0 )); then
> +				if [[ $a == "any" ]]; then
> +					error "$(gettext "%s_%s any can not be used for an architecture specific variable")" "$i" "$a"


I'm trying to see if this message can be clearer. How about this for the
error message?

("Can not provide architecture specific variables for the '%s' arch:
%s_%s") "any" "$i "$a

A


More information about the pacman-dev mailing list