On Thu, 24 Jan 2019 at 03:01, Allan McRae firstname.lastname@example.org wrote:
On 22/1/19 10:05 am, morganamilo wrote:
Variables such as 'pkgdesc_x86_64' are invalid, instead of ignoring them raise an error.
This also disallows using 'any' as an architecture specific variable
Signed-off-by: morganamilo email@example.com
v5: "libmakepkg: disallow using any as an architecture specific variable" was squashed into this commit.
Move this lint to its own file.
Moving this to its own file is fine in principle, but it has duplicated a few arrays of field values. After this patch there would be:
scripts/libmakepkg/lint_pkgbuild/variable.sh.in: scripts/libmakepkg/lint_pkgbuild/arch_specific.sh.in: local array=(... local arch_array=(... local string=(...
scripts/libmakepkg/lint_pkgbuild/package_function_variable.sh.in: local no_package=(...
This will be annoying to update for any new fields or other changes.
The properties of each field we are trying to capture are:
- is an array/string
- can be architecture specific
- overridable in package function
Can we store this in one file in a readily extendable fashion somewhere?
Good point. There was already a TODO on the fields, maybe it's finally time to act on it. I'm not too familiar with bash to really know a better way to structure it. Would just moving the arrays to a different file and sourcing be fine? util/pkgbuild.sh perhaps?