[pacman-dev] [PATCH 1/7] libmakepkg: disallow empty arch
Allan McRae
allan at archlinux.org
Tue Jun 19 12:14:13 UTC 2018
On 09/06/18 04:18, morganamilo wrote:
> We already ensure arch is an array but if arch is never defined
> this error never triggers. Add an explicit check for a missing arch.
>
> Signed-off-by: morganamilo <morganamilo at gmail.com>
> ---
OK.
> scripts/libmakepkg/lint_pkgbuild/arch.sh.in | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/scripts/libmakepkg/lint_pkgbuild/arch.sh.in b/scripts/libmakepkg/lint_pkgbuild/arch.sh.in
> index ef1aac46..f2c80c73 100644
> --- a/scripts/libmakepkg/lint_pkgbuild/arch.sh.in
> +++ b/scripts/libmakepkg/lint_pkgbuild/arch.sh.in
> @@ -33,6 +33,11 @@ lint_pkgbuild_functions+=('lint_arch')
> lint_arch() {
> local a name list ret=0
>
> + if [[ -z $arch ]]; then
> + error "$(gettext "%s is not allowed to be empty.")" "arch"
> + return 1
> + fi
> +
> if [[ $arch == 'any' ]]; then
> return 0
> fi
>
More information about the pacman-dev
mailing list