summaryrefslogtreecommitdiffstats
path: root/devel/management/commands
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-03-27 22:33:54 +0100
committerDan McGee <dan@archlinux.org>2010-03-28 00:09:33 +0100
commitc0633aa76f7e5fbe90db35fcf3dd74e2cc9ded24 (patch)
treef95810400a3593a4e5b30ea29731c1d9e692c431 /devel/management/commands
parent2af0ac721bba1c32978ef542a090d987a68a8309 (diff)
downloadarchweb-c0633aa76f7e5fbe90db35fcf3dd74e2cc9ded24.tar.gz
archweb-c0633aa76f7e5fbe90db35fcf3dd74e2cc9ded24.tar.xz
Make reporead always populate pkgbase
And also add a data migration to add the value retroactively for anything already in our database. We simply fall back to pkgname if pkgbase isn't available. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management/commands')
-rw-r--r--devel/management/commands/reporead.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index f83b127..32e7929 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -135,7 +135,10 @@ class Pkg(object):
def populate_pkg(dbpkg, repopkg, force=False, timestamp=None):
- dbpkg.pkgbase = repopkg.base
+ if repopkg.base:
+ dbpkg.pkgbase = repopkg.base
+ else:
+ dbpkg.pkgbase = repopkg.name
dbpkg.pkgver = repopkg.ver
dbpkg.pkgrel = repopkg.rel
dbpkg.pkgdesc = repopkg.desc