summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2009-01-01 18:36:32 +0100
committerDusty Phillips <buchuki@gmail.com>2009-01-01 18:36:32 +0100
commit278015f3e85145bb141eaf60a958be5f0f779a13 (patch)
tree62e81286ab06d51727f222c5a8cd2c1f12060453 /scripts
parentb3b52f5d69087a391b87b5eda693d99f8b2c1811 (diff)
downloadarchweb-278015f3e85145bb141eaf60a958be5f0f779a13.tar.gz
archweb-278015f3e85145bb141eaf60a958be5f0f779a13.tar.xz
Insert the license field into the package database when packages are updated.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/reporead.py5
1 files changed, 4 insertions, 1 deletions
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