From 451e60d91d48d69ba6ae139794c5168804d59136 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 31 May 2015 19:52:07 +0200 Subject: git-update: Check for missing install and source files Suggested-by: Marcel Korpel Suggested-by: carstene1ns Signed-off-by: Lukas Fleischer --- scripts/git-integration/git-update.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts/git-integration/git-update.py') diff --git a/scripts/git-integration/git-update.py b/scripts/git-integration/git-update.py index 2c15912..c7d64df 100755 --- a/scripts/git-integration/git-update.py +++ b/scripts/git-integration/git-update.py @@ -236,6 +236,17 @@ for commit in walker: die_commit('%s field too long: %s' % (field, pkginfo[field]), commit.id) + for field in ('install', 'changelog'): + if field in pkginfo and not pkginfo[field] in commit.tree: + die_commit('missing %s file: %s' % (field, pkginfo[field]), + commit.id) + + for fname in pkginfo['source']: + if "://" in fname or "lp:" in fname: + continue + if not fname in commit.tree: + die_commit('missing source file: %s' % (fname), commit.id) + srcinfo_raw = repo[repo[sha1_new].tree['.SRCINFO'].id].data.decode() srcinfo_raw = srcinfo_raw.split('\n') srcinfo = aurinfo.ParseAurinfoFromIterable(srcinfo_raw) -- cgit v1.2.3-70-g09d2