abuild: add subpkgver capabilities
Adds the option to set custom subpackage version.
As with arch, defined within the subpackages array using the following syntax: subpkgname:subpkgsplit:subpkgarch:subpkgver
.
Also brings the following improvements to subpkg_set
function:
-
subpkgarch
can be set without settingsubpkgsplit
- proper checking if
subpkgarch
is actually supported arch using newis_arch
function - proper checking if
subpkgver
is actually version information by checking if variable contains '.' - as long as syntax order is respected, any extra variables can be undefined
Possible improvements:
-
is_arch
relies on hardcoded localsupportedArch
array. It'd be nice if this was sourced from somewhere else so that future (un)supported architectures can automatically be detected. -
subpkg_set
certainly has room for optimizations. For readability, things were kept as-is to make sure there are no syntax bugs. - while
default_sanitycheck
was updated to checksubpkgver
, likely other aport sanity check scripts need updating - ideally
subpkg_set
should not need an explicit order to the arguments. With 2 out of 3 arguments being detectable, it would be possible forsubpkg_set
to go through all of the arguments and be able to read which arg is associated to which option. This would complexify the function, thus move away from KISS principles, which is why I didn't go this direction.
Accompanies lua-aports!4 Fixes part of: #10060
Edited by Antoine Martin