pacman/scripts/libmakepkg/lint_pkgbuild
Luke Shumaker cd7b2d6e07 makepkg: lint_pkgver: Run even if PKGVERFUNC
lint_pkgver returns 0 if PKGVERFUNC, since it's likely that update_pkgver()
will change the value of pkgver anyway, and there's no point in linting the
old value.  update_pkgver() will call check_pkgver() itself to validate the
new value.

However, that "optimization" only holds if we're definitely going to call
update_pkgver() later; and that's way more complicated than

    if (( PKGVERFUNC )); then

it's more like:

    if (( !GENINTEG && !PACKAGELIST && !PRINTSRCINFO && !SOURCEONLY && !REPKG && PKGVERFUNC )); then

Which is to say: If I have a PKGBUILD with pkgver():

 * if I run `makepkg -g` I expect it to lint pkgver, but it won't
 * if I run `makepkg -R` I expect it to lint pkgver, but it won't
 * ...

So let's fix that.

Rather than try to keep a huge list of conditions in sync with the flow of
makepkg.sh.in, let's just drop it.  As far as I can tell, the only thing
that skipping lint_pkgver() really enables is letting the PKGBUILD author
write `pkgver=` in the initial version, and letting pkgver() fill it in.
They can just start writing `pkgver=0` for that workflow.

Signed-off-by: Allan McRae <allan@archlinux.org>
2018-09-19 18:01:23 +10:00
..
arch.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
backup.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
changelog.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
checkdepends.sh.in libmakepkg: only save the shellopts we need 2018-05-12 21:11:52 +10:00
conflicts.sh.in libmakepkg: only save the shellopts we need 2018-05-12 21:11:52 +10:00
depends.sh.in makepkg: reduce strictness of pkgver in depends linting 2018-07-27 10:21:58 +10:00
epoch.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
install.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
makedepends.sh.in libmakepkg: only save the shellopts we need 2018-05-12 21:11:52 +10:00
optdepends.sh.in libmakepkg/lint_pkgbuild: permit versioned optdepends 2018-06-18 13:15:51 +10:00
options.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
package_function.sh.in makepkg: reject PKGBUILDs with both split and non-split package functions 2018-09-19 11:10:04 +10:00
pkgbase.sh.in libmakepkg/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +10:00
pkglist.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
pkgname.sh.in libmakepkg/lint_pkgbuild: squelch syntax error when a pkgname is empty 2018-06-18 13:15:51 +10:00
pkgrel.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
pkgver.sh.in makepkg: lint_pkgver: Run even if PKGVERFUNC 2018-09-19 18:01:23 +10:00
provides.sh.in libmakepkg/lint_pkgbuild: fix regression in linting depends=(foo=$epoch:$pkgver-$pkgrel) 2018-05-12 21:10:44 +10:00
source.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
util.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
variable.sh.in libmakepkg: add pkgbase to linted variables 2018-08-10 12:37:19 +10:00