summaryrefslogtreecommitdiffstats
path: root/scripts/git-integration/git-update.py
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-05-31 19:52:07 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-01 23:25:59 +0200
commit451e60d91d48d69ba6ae139794c5168804d59136 (patch)
treefe44093b67fe0c97fbe98c06070302f4f7e2a22e /scripts/git-integration/git-update.py
parentb44411fb5399f75939a57f0ccc8166d06fa8ba6f (diff)
downloadaurweb-451e60d91d48d69ba6ae139794c5168804d59136.tar.xz
git-update: Check for missing install and source files
Suggested-by: Marcel Korpel <marcel.korpel@gmail.com> Suggested-by: carstene1ns <arch@carsten-teibes.de> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'scripts/git-integration/git-update.py')
-rwxr-xr-xscripts/git-integration/git-update.py11
1 files changed, 11 insertions, 0 deletions
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)