[pacman-dev] [PATCH 1/3] makepkg: Better error messages for versions in (check, make, opt)depends/provides/conflicts

Eli Schwartz eschwartz at archlinux.org
Wed Aug 8 04:40:03 UTC 2018


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20180808/f04e943a/attachment.asc>


More information about the pacman-dev mailing list