FS#48193 - New "missing mandatory field" errors

Attached to Project: AUR web interface
Opened by Andrew Stubbs (ams) - Monday, 15 February 2016, 13:16 GMT
Last edited by Lukas Fleischer (lfleischer) - Monday, 15 February 2016, 16:46 GMT
Task Type Bug Report
Category PKGBUILD Parser
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version 4.1.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The AUR git commit hook is now refusing to accept PKGBUILD files that have the following idiom:

_name='zsh-autosuggestions'
pkgname="${_name}-git"

These worked before the 4.2 update, but now give:

Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 565 bytes | 0 bytes/s, done.
Total 5 (delta 3), reused 0 (delta 0)
remote: error: The following error occurred when parsing commit
remote: error: ce0e8c23208c1a08f7d79c5d38280b48d0615aa5:
remote: error: missing mandatory field: pkgname
remote: error: hook declined to update refs/heads/master
Toaur@aur.archlinux.org/zsh-autosuggestions-git.git"> ssh://aur@aur.archlinux.org/zsh-autosuggestions-git.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://aur@aur.archlinux.org/zsh-autosuggestions-git.git'
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Monday, 15 February 2016, 16:46 GMT
Reason for closing:  Fixed
Comment by Mark Weiman (markzz) - Monday, 15 February 2016, 13:19 GMT
What happens when you reset the commit, then create a new .SRCINFO? Does this solve your issue?
Comment by Andrew Stubbs (ams) - Monday, 15 February 2016, 13:23 GMT
The .SRCINFO does not change; it has the proper pkgname, with the variable substitutions taken care of.

If I rewrite the PKGBUILD with "pkgname=zsh-autosuggestions-git", then the .SRCINFO remains the same, but the package now uploads fine.
Comment by Mark Weiman (markzz) - Monday, 15 February 2016, 13:48 GMT
Okay, I just tested this a pkgbase that I just adopted now that has a similar setup. The package is ruby-minitest.

The PKGBUILD contains these lines:
_gemname='minitest'
pkgname="ruby-${_gemname}"

Once I made a new .SRCINFO (using mksrcinfo from pkgbuild-introspection) and pushed the new commit up, all went fine and with no errors.

Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 488 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To ssh+git://aur@aur.archlinux.org/ruby-minitest.git
4674898..b85d4fe master -> master

I cannot reproduce this issue.
Comment by Andrew Stubbs (ams) - Monday, 15 February 2016, 14:02 GMT
I discovered that I had an old version of mksrcinfo installed. Apparently I had installed it from pkgbuild-introspection-git, not the official package, and since nobody ever updated that package, I never got the updates.

Anyway, after updating the mksrcinfo the upload now works. The strange thing is, there's no material difference in the .SRCINFO file; it now has a header comment, but that's all that changed.

The commit I just uploaded:

https://aur.archlinux.org/cgit/aur.git/commit/?h=zsh-autosuggestions-git&id=1eb6679dc67db66b2ed47f703db17c41404576e6

It seems like the srcinfo parser doesn't read old .SRCINFO files properly.
Comment by Mark Weiman (markzz) - Monday, 15 February 2016, 14:08 GMT Comment by Andrew Stubbs (ams) - Monday, 15 February 2016, 14:14 GMT
OK, maybe I'm coming to false conclusions because things changed on the other end?

Anyway, I appear to be unblocked. Thanks all.

Loading...