summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-03-27 16:33:54 -0500
committerDan McGee <dan@archlinux.org>2010-03-27 18:09:33 -0500
commitc0633aa76f7e5fbe90db35fcf3dd74e2cc9ded24 (patch)
treef95810400a3593a4e5b30ea29731c1d9e692c431 /devel
parent2af0ac721bba1c32978ef542a090d987a68a8309 (diff)
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')
-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 f83b127e..32e7929e 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