git-update: Check for missing pkgname entries
diff mbox

Message ID 20170406035808.13118-1-lfleischer@archlinux.org
State Accepted, archived
Headers show

Commit Message

Lukas Fleischer April 6, 2017, 3:58 a.m. UTC
Reject commits containing .SRCINFO files without any pkgname entries.

Suggested-by: Bruno Pagani <bruno.n.pagani@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
---
 aurweb/git/update.py | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox

diff --git a/aurweb/git/update.py b/aurweb/git/update.py
index 3b84eb5..532db92 100755
--- a/aurweb/git/update.py
+++ b/aurweb/git/update.py
@@ -308,6 +308,9 @@  def main():
             die_commit('invalid pkgbase: {:s}'.format(metadata_pkgbase),
                        str(commit.id))
 
+        if not metadata['packages']:
+            die_commit('missing pkgname entry', str(commit.id))
+
         for pkgname in set(metadata['packages'].keys()):
             pkginfo = srcinfo.utils.get_merged_package(pkgname, metadata)