mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
git-update.py: Check for mandatory fields
Check explicitly whether pkgver, pkgrel, pkgname, pkgdesc and url are available in each package. If any of these is missing, an exception might occur when parsing the meta data later. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
4dbd562b8e
commit
3488581046
1 changed files with 4 additions and 0 deletions
|
@ -212,6 +212,10 @@ for commit in walker:
|
|||
for pkgname in srcinfo.GetPackageNames():
|
||||
pkginfo = srcinfo.GetMergedPackage(pkgname)
|
||||
|
||||
for field in ('pkgver', 'pkgrel', 'pkgname', 'pkgdesc', 'url'):
|
||||
if not field in pkginfo:
|
||||
die_commit('missing mandatory field: %s' % (field), commit.id)
|
||||
|
||||
if 'epoch' in pkginfo and not pkginfo['epoch'].isdigit():
|
||||
die_commit('invalid epoch: %s' % (pkginfo['epoch']), commit.id)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue