diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2015-01-15 09:32:48 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2015-01-15 09:35:01 +0100 |
commit | 3488581046966d674f90e3f6811ebb3764482197 (patch) | |
tree | 4d754dcb0d6ceab8f54af34ca66da30c52062f8c /scripts/git-integration/git-update.py | |
parent | 4dbd562b8e5bf8d44a7a19b8e248b2b0e0295eb2 (diff) | |
download | aurweb-3488581046966d674f90e3f6811ebb3764482197.tar.xz |
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>
Diffstat (limited to 'scripts/git-integration/git-update.py')
-rwxr-xr-x | scripts/git-integration/git-update.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/git-integration/git-update.py b/scripts/git-integration/git-update.py index 3d2742a..161d42f 100755 --- a/scripts/git-integration/git-update.py +++ b/scripts/git-integration/git-update.py @@ -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) |