On Tue, 19 Jun 2018 at 13:28, Allan McRae email@example.com wrote:
On 09/06/18 05:33, Eli Schwartz wrote:
On 06/08/2018 02:18 PM, 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.
Good catch! We'd usually abort with ==> ERROR: foo is not available for the 'x86_64' architecture.
but not if we're doing some IGNOREARCH operation that doesn't check this, e.g. --source or --printsrcinfo or --packagelist
Or, makepkg --ignorearch.
Hrm... I just saw this after replying the patch was OK.
With this patch:
$ /home/allan/arch/code/pacman/scripts/makepkg --ignorearch ==> ERROR: arch is not allowed to be empty.
I think our current check is OK here and this additional check is too stringent.
I would have to disagree. The man page (which I used as a reference to most of these patches) explicitly states arch as a required field along side pkgver, pkgrel and pkgname.
Given the existence of 'any', having no arch field makes no sense under any circumstances.
Not having this check has lead to a number packages missing this field. See:
https://aur.archlinux.org/packages/highmoon/ https://aur.archlinux.org/packages/iview/ https://aur.archlinux.org/packages/mipsel-linux-gcc3/ https://aur.archlinux.org/packages/mipsel-linux-gcc3-initial/ https://aur.archlinux.org/packages/mipsel-linux-libstdc++5/