From 61cdf09cd0581940639d0a6ebf09788f61b93eb9 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sat, 20 Jun 2015 12:47:23 +0200 Subject: Make url and pkgdesc fields optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The url and pkgdesc PKGBUILD variables are optional, so they should be in the AUR as well. Signed-off-by: Johannes Löthberg Signed-off-by: Lukas Fleischer --- git-interface/git-update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'git-interface') diff --git a/git-interface/git-update.py b/git-interface/git-update.py index 6610019..41a3474 100755 --- a/git-interface/git-update.py +++ b/git-interface/git-update.py @@ -77,6 +77,10 @@ def save_srcinfo(srcinfo, db, cur, user): else: ver = '%s-%s' % (pkginfo['pkgver'], pkginfo['pkgrel']) + for field in ('pkgdesc', 'url'): + if not field in pkginfo: + pkginfo[field] = None + # Create a new package. cur.execute("INSERT INTO Packages (PackageBaseID, Name, " + "Version, Description, URL) " + @@ -247,7 +251,7 @@ for commit in walker: for pkgname in srcinfo.GetPackageNames(): pkginfo = srcinfo.GetMergedPackage(pkgname) - for field in ('pkgver', 'pkgrel', 'pkgname', 'pkgdesc', 'url'): + for field in ('pkgver', 'pkgrel', 'pkgname'): if not field in pkginfo: die_commit('missing mandatory field: %s' % (field), commit.id) @@ -259,7 +263,7 @@ for commit in walker: commit.id) for field in ('pkgname', 'pkgdesc', 'url'): - if len(pkginfo[field]) > 255: + if field in pkginfo and len(pkginfo[field]) > 255: die_commit('%s field too long: %s' % (field, pkginfo[field]), commit.id) -- cgit v1.2.3-54-g00ecf