On 08/08/2018 12:20 AM, Luke Shumaker wrote:
+lint_pkgrel() { + if (( PKGVERFUNC )); then + # defer check to after getting version from pkgver function + return 0 + fi
Why are you delaying this? I assume to match how we do pkgver. But that's a change in how we currently handle it. I suppose we should consistently treat both variables which makepkg can auto-update... but it shouldn't be silently changed without mention in the commit logs. And it probably deserves its own commit.
You're right, this should have at least been a separate commit.
Since if pkgver() changes the value of pkgver, it also resets pkgrel to '1', I figured that there's no point in linting the old value.
And I'm not positive why we do so for pkgver either TBH. It's been like that since 4b129d484394ce6090a9ed21782fe1df2227ad18 when we added validation after running pkgver() at all, but the commit logs are not clear on why. Maybe to allow the initial author to use `pkgver=` and set the initial value using makepkg?
I'll study how it uses PKGVERFUNC and see if I can come up with an answer.
Addendum! In update_pkgver() we run `check_pkgver "$newpkgver"` but we do not ever re-lint thea (old) pkgrel. Your current patch means we never lint it at all, if pkgver() exists. If we're going to delay this, then we still need to lint the old value to cover the case where update_pkgver() does not end up modifying the PKGBUILD and therefore the pkgrel does not change. -- Eli Schwartz Bug Wrangler and Trusted User