From 278015f3e85145bb141eaf60a958be5f0f779a13 Mon Sep 17 00:00:00 2001 From: Dusty Phillips Date: Thu, 1 Jan 2009 12:36:32 -0500 Subject: Insert the license field into the package database when packages are updated. --- scripts/reporead.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/reporead.py b/scripts/reporead.py index 9904201..5ac2f82 100755 --- a/scripts/reporead.py +++ b/scripts/reporead.py @@ -85,6 +85,8 @@ class Pkg(object): val['desc'] = '' if 'url' not in val: val['url'] = '' + if 'license' not in val: + val['license'] = [] for x in val.keys(): if x in squash: if len(val[x]) == 0: @@ -198,7 +200,7 @@ def db_update(archname, pkgs): repo = repository, arch=architecture, maintainer_id = 0, needupdate = False, url = p.url, last_update = now, pkgname = p.name, pkgver = p.ver, pkgrel = p.rel, - pkgdesc = p.desc) + pkgdesc = p.desc, license = p.license) pkg.save() # files are not in the repo.db.tar.gz #for x in p.files: @@ -236,6 +238,7 @@ def db_update(archname, pkgs): pkg.pkgver = p.ver pkg.pkgrel = p.rel pkg.pkgdesc = p.desc + pkg.license = p.license pkg.url = p.url pkg.needupdate = False pkg.last_update = now -- cgit v1.2.3-24-g4f1b