diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2015-06-20 12:47:23 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-06-20 14:29:43 +0200 |
commit | 61cdf09cd0581940639d0a6ebf09788f61b93eb9 (patch) | |
tree | 39745cf03579b8c2785f05d2ee69b0aade233e6c /git-interface/git-update.py | |
parent | 5d9a80a546265d7c746b236a186a142bc3ecc35e (diff) | |
download | aur-61cdf09cd0581940639d0a6ebf09788f61b93eb9.tar.gz aur-61cdf09cd0581940639d0a6ebf09788f61b93eb9.tar.xz |
Make url and pkgdesc fields optional
The url and pkgdesc PKGBUILD variables are optional, so they should be
in the AUR as well.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'git-interface/git-update.py')
-rwxr-xr-x | git-interface/git-update.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git-interface/git-update.py b/git-interface/git-update.py index 66100195..41a34742 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) |