[aur-dev] [PATCH] git-update: Check for missing install and source files

Lukas Fleischer lfleischer at archlinux.org
Sun May 31 17:54:50 UTC 2015


Suggested-by: Marcel Korpel <marcel.lists at gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 scripts/git-integration/git-update.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/git-integration/git-update.py b/scripts/git-integration/git-update.py
index 161d42f..0fa1ce2 100755
--- a/scripts/git-integration/git-update.py
+++ b/scripts/git-integration/git-update.py
@@ -235,6 +235,16 @@ for commit in walker:
                 die_commit('%s field too long: %s' % (field, pkginfo[field]),
                            commit.id)
 
+        if 'install' in pkginfo and not pkginfo['install'] in commit.tree:
+            die_commit('missing install file: %s' % (pkginfo['install']),
+                       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)
-- 
2.4.1


More information about the aur-dev mailing list