aurweb/aurweb
Eli Schwartz e454a0200c
git update hook: gracefully error on completely broken .SRCINFO
I've seen this happen a bunch of times now. Someone cannot push to the
AUR, and the error report is some traceback with a KeyError which is
difficult to understand without context:

remote: Traceback (most recent call last):
remote:   File "/srv/http/aurweb/aur.git/hooks/update", line 33, in <module>
remote:     sys.exit(load_entry_point('aurweb==5.0.0', 'console_scripts', 'aurweb-git-update')())
remote:   File "/usr/lib/python3.9/site-packages/aurweb-5.0.0-py3.9.egg/aurweb/git/update.py", line 306, in main
remote: KeyError: 'pkgbase'

Eventually it turns out that their .SRCINFO file is... badly corrupted.
Generally, they managed to accidentally commit an *empty* file instead
of a .SRCINFO, and in all cases, the problem was on the very first
lookup for 'pkgbase'.

Point people to the actual failing commit, and have a nicely formatted
message indicating that the .SRCINFO is completely invalid.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2021-05-10 23:22:00 -04:00
..
git git update hook: gracefully error on completely broken .SRCINFO 2021-05-10 23:22:00 -04:00
routers Redirect to referer after SSO login 2021-02-20 11:25:21 -05:00
scripts Exclude suspended Users from being notified 2021-02-20 11:24:30 -05:00
__init__.py Use setuptools to install Python modules 2016-09-29 22:07:06 +02:00
asgi.py HTML error pages for FastAPI 2021-02-20 11:24:30 -05:00
config.py config: allow reading both the defaults file and the modified config 2018-04-22 09:26:10 +02:00
db.py Integrate SQLAlchemy into FastAPI 2021-02-20 11:24:30 -05:00
exceptions.py git-serve: check update hook permissions 2019-11-23 11:18:16 -05:00
initdb.py Refactor code to comply with flake8 and isort 2021-02-20 11:24:30 -05:00
l10n.py Build a translation facility for FastAPI 2021-02-20 11:24:30 -05:00
schema.py Add SSO account ID in table Users 2021-02-20 11:24:30 -05:00
spawn.py swap uvicorn out for hypercorn 2021-05-10 23:22:00 -04:00